|
@@ -122,10 +122,11 @@ public class UserController {
|
|
|
*/
|
|
|
@ApiOperation(value = "查询应用菜单信息")
|
|
|
@RequestMapping(value = "/findTenantMenu", method = RequestMethod.GET)
|
|
|
- public AjaxMessage<List<MenuEntity>> findTenantMenu(@ApiParam(value = "应用ID", required = true) @RequestParam String appId) {
|
|
|
+ public AjaxMessage<List<MenuEntity>> findTenantMenu(@ApiParam(value = "应用ID", required = true) @RequestParam String appId) {
|
|
|
List<MenuEntity> menuEntityList = menuService.findTenantMenu(appId);
|
|
|
return new AjaxMessage<>(ResultStatus.OK, menuEntityList);
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 新增
|
|
|
*/
|
|
@@ -211,8 +212,20 @@ public class UserController {
|
|
|
isOk = false;
|
|
|
}
|
|
|
}
|
|
|
- if (!isOk)
|
|
|
+ //租户管理员不能删除限制
|
|
|
+// boolean isDelete = true;
|
|
|
+// for (Long id : ids) {
|
|
|
+// UserEntity userEntity = userService.findUserById(id);
|
|
|
+// if (userEntity.getUserType().equals("-999")) {
|
|
|
+// isDelete = false;
|
|
|
+// }
|
|
|
+// }
|
|
|
+ if (!isOk) {
|
|
|
return new AjaxMessage<>(ResultStatus.EXSIT_IS_ACCOUNT_ERROR, 0);
|
|
|
+ }
|
|
|
+// if (!isDelete) {
|
|
|
+// return new AjaxMessage<>(ResultStatus.DELETE_IS_ACCOUNT_ERROR, 0);
|
|
|
+// }
|
|
|
int result = userService.delUserByIds(ids) ? 1 : 0;
|
|
|
return new AjaxMessage<>(ResultStatus.OK, result);
|
|
|
}
|
|
@@ -227,10 +240,15 @@ public class UserController {
|
|
|
public AjaxMessage<Integer> deleteUserById(@ApiParam(value = "用户ID", required = true) @RequestParam Long id) {
|
|
|
LoginUser currentUser = UserUtil.getCurrentUser();
|
|
|
Integer userId = currentUser.getId();
|
|
|
- System.out.println("userId"+userId);
|
|
|
+ System.out.println("userId" + userId);
|
|
|
if (userId.toString().equals(id.toString())) {
|
|
|
return new AjaxMessage<>(ResultStatus.EXSIT_IS_ACCOUNT_ERROR, 0);
|
|
|
}
|
|
|
+ //租户管理员不能删除限制
|
|
|
+// UserEntity userEntity = userService.findUserById(id);
|
|
|
+// if (userEntity.getUserType().equals("-999")) {
|
|
|
+// return new AjaxMessage<>(ResultStatus.DELETE_IS_ACCOUNT_ERROR, 0);
|
|
|
+// }
|
|
|
int result = userService.delUserById(id) ? 1 : 0;
|
|
|
return new AjaxMessage<>(ResultStatus.OK, result);
|
|
|
}
|