Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
50bb8cfc
Commit
50bb8cfc
authored
Jan 10, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
菜单角色 调优
parent
c0af9aeb
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
62 additions
and
3 deletions
+62
-3
MSetttleCustomerUserController.java
...u/archives/controller/MSetttleCustomerUserController.java
+15
-0
MSetttleCustomerUserMapper.java
...s/v1/yifu/archives/mapper/MSetttleCustomerUserMapper.java
+2
-0
MSetttleCustomerUserService.java
...v1/yifu/archives/service/MSetttleCustomerUserService.java
+2
-0
MSetttleCustomerUserServiceImpl.java
...rchives/service/impl/MSetttleCustomerUserServiceImpl.java
+12
-0
MSetttleCustomerUserMapper.xml
.../src/main/resources/mapper/MSetttleCustomerUserMapper.xml
+3
-1
ArchivesDaprUtil.java
...cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
+14
-0
BusinessUserController.java
...plus/v1/yifu/admin/controller/BusinessUserController.java
+5
-1
SysUserServiceImpl.java
...d/plus/v1/yifu/admin/service/impl/SysUserServiceImpl.java
+6
-1
SysUserMapper.xml
...yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
+3
-0
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/MSetttleCustomerUserController.java
View file @
50bb8cfc
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.MSetttleCustomerUser
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.MSetttleCustomerUser
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.MSetttleCustomerUserService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.MSetttleCustomerUserService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
...
@@ -115,4 +116,18 @@ public class MSetttleCustomerUserController {
...
@@ -115,4 +116,18 @@ public class MSetttleCustomerUserController {
public
Integer
getCustomerCount
()
{
public
Integer
getCustomerCount
()
{
return
mSetttleCustomerUserService
.
getCustomerCount
();
return
mSetttleCustomerUserService
.
getCustomerCount
();
}
}
/**
* @Author fxj
* @Description 远程接口获取用户B端权限关系
* @Date 10:18 2023/1/10
**/
@Inner
@PostMapping
(
"/getSettlePermissionForB"
)
public
TSettleDomainListVo
getSettlePermissionForB
(
@RequestBody
String
userId
)
{
TSettleDomainListVo
vo
=
new
TSettleDomainListVo
();
vo
.
setDeptIds
(
mSetttleCustomerUserService
.
getSettlePermissionForB
(
userId
));
return
vo
;
}
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/MSetttleCustomerUserMapper.java
View file @
50bb8cfc
...
@@ -30,4 +30,6 @@ public interface MSetttleCustomerUserMapper extends BaseMapper<MSetttleCustomerU
...
@@ -30,4 +30,6 @@ public interface MSetttleCustomerUserMapper extends BaseMapper<MSetttleCustomerU
List
<
MSetttleCustomerUserVo
>
getCustomerUser
(
@Param
(
"userIdList"
)
List
<
Integer
>
userIdList
);
List
<
MSetttleCustomerUserVo
>
getCustomerUser
(
@Param
(
"userIdList"
)
List
<
Integer
>
userIdList
);
Integer
getCustomerCount
();
Integer
getCustomerCount
();
List
<
String
>
getSettlePermissionForB
(
@Param
(
"userId"
)
String
userId
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/MSetttleCustomerUserService.java
View file @
50bb8cfc
...
@@ -29,4 +29,6 @@ public interface MSetttleCustomerUserService extends IService<MSetttleCustomerUs
...
@@ -29,4 +29,6 @@ public interface MSetttleCustomerUserService extends IService<MSetttleCustomerUs
Map
<
String
,
String
>
getCustomerUser
(
List
<
Integer
>
userIdList
);
Map
<
String
,
String
>
getCustomerUser
(
List
<
Integer
>
userIdList
);
Integer
getCustomerCount
();
Integer
getCustomerCount
();
List
<
String
>
getSettlePermissionForB
(
String
userId
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/MSetttleCustomerUserServiceImpl.java
View file @
50bb8cfc
...
@@ -3,11 +3,15 @@ package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
...
@@ -3,11 +3,15 @@ package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.MSetttleCustomerUser
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.MSetttleCustomerUser
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.MSetttleCustomerUserMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.MSetttleCustomerUserMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.MSetttleCustomerUserService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.MSetttleCustomerUserService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.MSetttleCustomerUserVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.MSetttleCustomerUserVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -51,4 +55,12 @@ public class MSetttleCustomerUserServiceImpl extends ServiceImpl<MSetttleCustome
...
@@ -51,4 +55,12 @@ public class MSetttleCustomerUserServiceImpl extends ServiceImpl<MSetttleCustome
public
Integer
getCustomerCount
()
{
public
Integer
getCustomerCount
()
{
return
baseMapper
.
getCustomerCount
();
return
baseMapper
.
getCustomerCount
();
}
}
@Override
public
List
<
String
>
getSettlePermissionForB
(
String
userId
)
{
if
(
Common
.
isNotNull
(
userId
)){
return
baseMapper
.
getSettlePermissionForB
(
userId
);
}
return
null
;
}
}
}
yifu-archives/yifu-archives-biz/src/main/resources/mapper/MSetttleCustomerUserMapper.xml
View file @
50bb8cfc
...
@@ -51,5 +51,7 @@
...
@@ -51,5 +51,7 @@
<select
id=
"getCustomerCount"
resultType=
"java.lang.Integer"
>
<select
id=
"getCustomerCount"
resultType=
"java.lang.Integer"
>
SELECT count(DISTINCT customer_id) from m_setttle_customer_user a ;
SELECT count(DISTINCT customer_id) from m_setttle_customer_user a ;
</select>
</select>
<select
id=
"getSettlePermissionForB"
resultType=
"java.lang.String"
>
SELECT DISTINCT settle_id from m_setttle_customer_user a where a.user_id=#{userId}
</select>
</mapper>
</mapper>
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/ArchivesDaprUtil.java
View file @
50bb8cfc
...
@@ -458,4 +458,18 @@ public class ArchivesDaprUtil {
...
@@ -458,4 +458,18 @@ public class ArchivesDaprUtil {
}
}
return
res
;
return
res
;
}
}
/**
* @Author fxj
* @Description 获取所有客户单位的项目信息
* @Date 21:18 2022/7/18
* @Param
* @return
**/
public
R
<
TSettleDomainListVo
>
getSettlePermissionForB
(
String
userId
){
R
<
TSettleDomainListVo
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprArchivesProperties
.
getAppUrl
(),
daprArchivesProperties
.
getAppId
(),
"/msetttlecustomeruser/getSettlePermissionForB"
,
userId
,
TSettleDomainListVo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
res
)){
return
R
.
failed
(
"获取B端项目信息失败!"
);
}
return
res
;
}
}
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/controller/BusinessUserController.java
View file @
50bb8cfc
...
@@ -78,6 +78,7 @@ public class BusinessUserController {
...
@@ -78,6 +78,7 @@ public class BusinessUserController {
@Operation
(
description
=
"B端用户分页"
)
@Operation
(
description
=
"B端用户分页"
)
public
R
<
Page
<
BusinessUserVo
>>
getBusinessUserPage
(
Page
<
BusinessUserVo
>
page
,
BusinessUserVo
user
)
{
public
R
<
Page
<
BusinessUserVo
>>
getBusinessUserPage
(
Page
<
BusinessUserVo
>
page
,
BusinessUserVo
user
)
{
user
.
setDeptId
(
CommonConstants
.
HR_B_ORG_ID
);
user
.
setDeptId
(
CommonConstants
.
HR_B_ORG_ID
);
user
.
setType
(
CommonConstants
.
TWO_STRING
);
Page
<
BusinessUserVo
>
businessUserVoPage
=
userService
.
getBusinessUserVoPage
(
page
,
user
);
Page
<
BusinessUserVo
>
businessUserVoPage
=
userService
.
getBusinessUserVoPage
(
page
,
user
);
//获取客户信息
//获取客户信息
if
(
Common
.
isNotNull
(
businessUserVoPage
.
getRecords
())){
if
(
Common
.
isNotNull
(
businessUserVoPage
.
getRecords
())){
...
@@ -134,7 +135,10 @@ public class BusinessUserController {
...
@@ -134,7 +135,10 @@ public class BusinessUserController {
sysUser
=
userService
.
getOne
(
Wrappers
.<
SysUser
>
lambdaQuery
().
eq
(
SysUser:
:
getUsername
,
user
.
getUsername
()).
ne
(
SysUser:
:
getUserId
,
user
.
getUserId
())
sysUser
=
userService
.
getOne
(
Wrappers
.<
SysUser
>
lambdaQuery
().
eq
(
SysUser:
:
getUsername
,
user
.
getUsername
()).
ne
(
SysUser:
:
getUserId
,
user
.
getUserId
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
user
.
getPhone
())){
if
(
Common
.
isNotNull
(
user
.
getPhone
())){
userTemp
=
userService
.
getOne
(
Wrappers
.<
SysUser
>
lambdaQuery
().
eq
(
SysUser:
:
getPhone
,
user
.
getPhone
()).
ne
(
SysUser:
:
getUserId
,
user
.
getUserId
())
userTemp
=
userService
.
getOne
(
Wrappers
.<
SysUser
>
lambdaQuery
()
.
eq
(
SysUser:
:
getPhone
,
user
.
getPhone
())
.
ne
(
SysUser:
:
getUserId
,
user
.
getUserId
())
.
eq
(
SysUser:
:
getType
,
CommonConstants
.
TWO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
}
}
}
else
{
}
else
{
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/service/impl/SysUserServiceImpl.java
View file @
50bb8cfc
...
@@ -162,7 +162,12 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
...
@@ -162,7 +162,12 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
);
);
}
}
// 结算主体权限
// 结算主体权限
R
<
TSettleDomainListVo
>
sdRes
=
archivesDaprUtil
.
getPermissionByUserId
(
sysUser
.
getUserId
());
R
<
TSettleDomainListVo
>
sdRes
=
null
;
if
(
CommonConstants
.
TWO_STRING
.
equals
(
sysUser
.
getType
())){
sdRes
=
archivesDaprUtil
.
getSettlePermissionForB
(
sysUser
.
getUserId
());
}
else
{
sdRes
=
archivesDaprUtil
.
getPermissionByUserId
(
sysUser
.
getUserId
());
}
if
(
Common
.
isNotNull
(
sdRes
)
&&
Common
.
isNotNull
(
sdRes
.
getData
())){
if
(
Common
.
isNotNull
(
sdRes
)
&&
Common
.
isNotNull
(
sdRes
.
getData
())){
userInfo
.
setSettleIdList
(
sdRes
.
getData
().
getDeptIds
());
userInfo
.
setSettleIdList
(
sdRes
.
getData
().
getDeptIds
());
}
}
...
...
yifu-upms/yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
View file @
50bb8cfc
...
@@ -307,6 +307,9 @@
...
@@ -307,6 +307,9 @@
<if
test=
"query.deptId != null and query.deptId != ''"
>
<if
test=
"query.deptId != null and query.deptId != ''"
>
and `user`.dept_id = #{query.deptId}
and `user`.dept_id = #{query.deptId}
</if>
</if>
<if
test=
"query.type != null and query.type != ''"
>
and `user`.type = #{query.type}
</if>
<if
test=
"query.nickname != null and query.nickname != ''"
>
<if
test=
"query.nickname != null and query.nickname != ''"
>
and `user`.nickname LIKE CONCAT('%',#{query.nickname},'%')
and `user`.nickname LIKE CONCAT('%',#{query.nickname},'%')
</if>
</if>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment