|
@@ -165,36 +165,6 @@ public class UserController {
|
|
|
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
|
|
public R submit(@Valid @RequestBody UserDTO user) {
|
|
|
CacheUtil.clear(USER_CACHE);
|
|
|
- // 内控系统拆分
|
|
|
-/* List<DeptUserVO> deptList = user.getDeptList();
|
|
|
- if (deptList != null && deptList.size() >= 1) {
|
|
|
- user.setRoleId(JSON.toJSONString(deptList));
|
|
|
- String deptId = "";
|
|
|
- String postId = "";
|
|
|
- String isLaderpostId = "";
|
|
|
- for (int i = 0; i < deptList.size(); i++) {
|
|
|
- DeptUserVO deptUserVO = deptList.get(i);
|
|
|
- if (i == 0) {
|
|
|
- deptId += deptUserVO.getDeptId() + "";
|
|
|
- postId += deptUserVO.getPostId() + "";
|
|
|
- if (deptUserVO.getIsLeader() == 1) {
|
|
|
- isLaderpostId = deptUserVO.getDeptId() + "";
|
|
|
- }
|
|
|
- } else {
|
|
|
- deptId += "," + deptUserVO.getDeptId();
|
|
|
- postId += "," + deptUserVO.getPostId() + ",";
|
|
|
- if (deptUserVO.getIsLeader() == 1) {
|
|
|
- isLaderpostId = "," + deptUserVO.getDeptId();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- user.setPostId(postId);
|
|
|
- user.setDeptId(deptId);
|
|
|
- user.setRoleId(postId);
|
|
|
- user.setIsLeader(isLaderpostId);
|
|
|
- }*/
|
|
|
-
|
|
|
-
|
|
|
return R.status(userService.submit(user));
|
|
|
}
|
|
|
|
|
@@ -219,33 +189,6 @@ public class UserController {
|
|
|
public R update(@Valid @RequestBody UserDTO user) {
|
|
|
CacheUtil.clear(USER_CACHE);
|
|
|
// 内控系统拆分
|
|
|
-/* List<DeptUserVO> deptList = user.getDeptList();
|
|
|
- if (deptList != null && deptList.size() >= 1) {
|
|
|
- String deptId = "";
|
|
|
- String postId = "";
|
|
|
- String isLaderpostId = "";
|
|
|
- for (int i = 0; i < deptList.size(); i++) {
|
|
|
- DeptUserVO deptUserVO = deptList.get(i);
|
|
|
- if (i == 0) {
|
|
|
- deptId += deptUserVO.getDeptId() + "";
|
|
|
- postId += deptUserVO.getPostId() + "";
|
|
|
- if (deptUserVO.getIsLeader() == 1) {
|
|
|
- isLaderpostId = deptUserVO.getDeptId() + "";
|
|
|
- }
|
|
|
- } else {
|
|
|
- deptId += "," + deptUserVO.getDeptId();
|
|
|
- postId += "," + deptUserVO.getPostId() + ",";
|
|
|
- if (deptUserVO.getIsLeader() == 1) {
|
|
|
- isLaderpostId = "," + deptUserVO.getDeptId();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- user.setIsLeader(isLaderpostId);
|
|
|
- user.setPostId(postId);
|
|
|
- user.setDeptId(deptId);
|
|
|
- user.setRoleId(postId);
|
|
|
- user.setDeptInfo(JSONArray.toJSONString(deptList));
|
|
|
- }*/
|
|
|
return R.status(userService.updateUser(user));
|
|
|
}
|
|
|
|