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
33bab140
Commit
33bab140
authored
Feb 26, 2025
by
chenyuxi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 部门相关接口
parent
68bebef9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
DeptController.java
...u/cloud/plus/v1/yifu/admin/controller/DeptController.java
+4
-4
SysDeptServiceImpl.java
...d/plus/v1/yifu/admin/service/impl/SysDeptServiceImpl.java
+2
-2
SysUserDeptPermissionServiceImpl.java
.../admin/service/impl/SysUserDeptPermissionServiceImpl.java
+6
-1
No files found.
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/controller/DeptController.java
View file @
33bab140
...
...
@@ -239,12 +239,12 @@ public class DeptController {
* 客户服务平台——获取项目下部门总数
* @return R<Integer> 部门总数
*/
@GetMapping
(
value
=
"/csp/getDeptCount
/{projectNo}
"
)
public
R
<
Integer
>
cspDeptCount
(
@PathVariable
String
projectNo
)
{
if
(
Common
.
isEmpty
(
projectNo
)){
@GetMapping
(
value
=
"/csp/getDeptCount"
)
public
R
<
Integer
>
cspDeptCount
(
SysDeptVo
dept
)
{
if
(
Common
.
isEmpty
(
dept
.
getProjectNo
()
)){
R
.
failed
(
"项目编码不能为空"
);
}
return
R
.
ok
(
sysDeptService
.
cspDeptCount
(
projectNo
));
return
R
.
ok
(
sysDeptService
.
cspDeptCount
(
dept
.
getProjectNo
()
));
}
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/service/impl/SysDeptServiceImpl.java
View file @
33bab140
...
...
@@ -447,8 +447,8 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
dept
.
setAncestors
(
info
.
getAncestors
()
+
","
+
dept
.
getParentId
());
}
}
dept
.
setClient
(
CommonConstants
.
ONE_STRING
);
// todo 去常量
dept
.
setClient
(
"yifu-csp"
);
this
.
save
(
dept
);
return
R
.
ok
(
"创建成功"
);
}
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/service/impl/SysUserDeptPermissionServiceImpl.java
View file @
33bab140
...
...
@@ -233,6 +233,9 @@ public class SysUserDeptPermissionServiceImpl extends ServiceImpl<SysUserDeptPer
// 更新用户数据权限
permissionInfo
.
setPermissionsType
(
sysUserDeptPermission
.
getPermissionsType
());
if
(!
CommonConstants
.
THREE_STRING
.
equals
(
sysUserDeptPermission
.
getPermissionsType
())){
sysUserDeptPermission
.
setAppointDeptScope
(
""
);
}
permissionInfo
.
setAppointDeptScope
(
sysUserDeptPermission
.
getAppointDeptScope
());
baseMapper
.
updateById
(
permissionInfo
);
redisUtil
.
remove
(
CacheConstants
.
USER_DETAILS
+
"::"
+
userInfo
.
getUsername
());
...
...
@@ -267,7 +270,9 @@ public class SysUserDeptPermissionServiceImpl extends ServiceImpl<SysUserDeptPer
}
// 更新用户数据权限
sysUserDeptPermission
.
setClient
(
CommonConstants
.
ONE_STRING
);
// todo 去常量
sysUserDeptPermission
.
setClient
(
"yifu-csp"
);
// 默认普通成员
sysUserDeptPermission
.
setUserType
(
CommonConstants
.
ONE_STRING
);
sysUserDeptPermission
.
setPermissionsType
(
CommonConstants
.
TWO_STRING
);
baseMapper
.
insert
(
sysUserDeptPermission
);
...
...
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