|
@@ -88,7 +88,7 @@ public class UserController {
|
|
|
@ApiOperationSupport(order = 1)
|
|
@ApiOperationSupport(order = 1)
|
|
|
@ApiOperation(value = "查看详情", notes = "传入id")
|
|
@ApiOperation(value = "查看详情", notes = "传入id")
|
|
|
@GetMapping("/detail")
|
|
@GetMapping("/detail")
|
|
|
- @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
|
|
|
|
|
|
+// @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
|
|
public R<UserVO> detail(User user) {
|
|
public R<UserVO> detail(User user) {
|
|
|
if (ObjectUtils.isNotNull(user.getId())) {
|
|
if (ObjectUtils.isNotNull(user.getId())) {
|
|
|
User detail = userService.getOne(Condition.getQueryWrapper(user));
|
|
User detail = userService.getOne(Condition.getQueryWrapper(user));
|
|
@@ -253,7 +253,7 @@ public class UserController {
|
|
|
})
|
|
})
|
|
|
@ApiOperationSupport(order = 3)
|
|
@ApiOperationSupport(order = 3)
|
|
|
@ApiOperation(value = "列表", notes = "传入account和realName")
|
|
@ApiOperation(value = "列表", notes = "传入account和realName")
|
|
|
- @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
|
|
|
|
|
|
+// @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
|
|
public R<IPage<UserVO>> list(@ApiIgnore @RequestParam Map<String, Object> user, Query query, BladeUser bladeUser) {
|
|
public R<IPage<UserVO>> list(@ApiIgnore @RequestParam Map<String, Object> user, Query query, BladeUser bladeUser) {
|
|
|
QueryWrapper<User> queryWrapper = Condition.getQueryWrapper(user, User.class);
|
|
QueryWrapper<User> queryWrapper = Condition.getQueryWrapper(user, User.class);
|
|
|
IPage<User> pages = userService.page(Condition.getPage(query), (!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(User::getTenantId, bladeUser.getTenantId()) : queryWrapper);
|
|
IPage<User> pages = userService.page(Condition.getPage(query), (!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(User::getTenantId, bladeUser.getTenantId()) : queryWrapper);
|
|
@@ -282,7 +282,7 @@ public class UserController {
|
|
|
@PostMapping("/submit")
|
|
@PostMapping("/submit")
|
|
|
@ApiOperationSupport(order = 4)
|
|
@ApiOperationSupport(order = 4)
|
|
|
@ApiOperation(value = "新增或修改", notes = "传入User")
|
|
@ApiOperation(value = "新增或修改", notes = "传入User")
|
|
|
- @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
|
|
|
|
|
|
+// @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
|
|
public R submit(@Valid @RequestBody User user) {
|
|
public R submit(@Valid @RequestBody User user) {
|
|
|
CacheUtil.clear(USER_CACHE);
|
|
CacheUtil.clear(USER_CACHE);
|
|
|
boolean status = userService.submit(user);
|
|
boolean status = userService.submit(user);
|
|
@@ -309,7 +309,7 @@ public class UserController {
|
|
|
@PostMapping("/remove")
|
|
@PostMapping("/remove")
|
|
|
@ApiOperationSupport(order = 6)
|
|
@ApiOperationSupport(order = 6)
|
|
|
@ApiOperation(value = "删除", notes = "传入id集合")
|
|
@ApiOperation(value = "删除", notes = "传入id集合")
|
|
|
- @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
|
|
|
|
|
|
+// @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
|
|
public R remove(@RequestParam String ids) {
|
|
public R remove(@RequestParam String ids) {
|
|
|
CacheUtil.clear(USER_CACHE);
|
|
CacheUtil.clear(USER_CACHE);
|
|
|
boolean status = userService.removeUser(ids);
|
|
boolean status = userService.removeUser(ids);
|
|
@@ -323,7 +323,7 @@ public class UserController {
|
|
|
@PostMapping("/grant")
|
|
@PostMapping("/grant")
|
|
|
@ApiOperationSupport(order = 7)
|
|
@ApiOperationSupport(order = 7)
|
|
|
@ApiOperation(value = "权限设置", notes = "传入roleId集合以及menuId集合")
|
|
@ApiOperation(value = "权限设置", notes = "传入roleId集合以及menuId集合")
|
|
|
- @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
|
|
|
|
|
|
+// @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
|
|
public R grant(@ApiParam(value = "userId集合", required = true) @RequestParam String userIds,
|
|
public R grant(@ApiParam(value = "userId集合", required = true) @RequestParam String userIds,
|
|
|
@ApiParam(value = "roleId集合", required = true) @RequestParam String roleIds) {
|
|
@ApiParam(value = "roleId集合", required = true) @RequestParam String roleIds) {
|
|
|
boolean temp = userService.grant(userIds, roleIds);
|
|
boolean temp = userService.grant(userIds, roleIds);
|
|
@@ -336,7 +336,7 @@ public class UserController {
|
|
|
@PostMapping("/reset-password")
|
|
@PostMapping("/reset-password")
|
|
|
@ApiOperationSupport(order = 8)
|
|
@ApiOperationSupport(order = 8)
|
|
|
@ApiOperation(value = "初始化密码", notes = "传入userId集合")
|
|
@ApiOperation(value = "初始化密码", notes = "传入userId集合")
|
|
|
- @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
|
|
|
|
|
|
+// @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
|
|
// public R resetPassword(@ApiParam(value = "userId集合", required = true) @RequestParam String userIds) {
|
|
// public R resetPassword(@ApiParam(value = "userId集合", required = true) @RequestParam String userIds) {
|
|
|
public R resetPassword(@ApiParam(value = "userId集合", required = true) @RequestParam String userIds,
|
|
public R resetPassword(@ApiParam(value = "userId集合", required = true) @RequestParam String userIds,
|
|
|
@ApiParam(value = "密码", readOnly = true) @RequestParam(value = "newPassword") String password) {
|
|
@ApiParam(value = "密码", readOnly = true) @RequestParam(value = "newPassword") String password) {
|
|
@@ -455,7 +455,7 @@ public class UserController {
|
|
|
@ApiOperationSupport(order = 17)
|
|
@ApiOperationSupport(order = 17)
|
|
|
@ApiOperation(value = "查看平台详情", notes = "传入id")
|
|
@ApiOperation(value = "查看平台详情", notes = "传入id")
|
|
|
@GetMapping("/platform-detail")
|
|
@GetMapping("/platform-detail")
|
|
|
- @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
|
|
|
|
|
|
+// @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
|
|
public R<UserVO> platformDetail(User user) {
|
|
public R<UserVO> platformDetail(User user) {
|
|
|
return R.data(userService.platformDetail(user));
|
|
return R.data(userService.platformDetail(user));
|
|
|
}
|
|
}
|