|
|
@@ -40,7 +40,7 @@ public class UserAdminController extends FrontBaseController { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@PostMapping("/index") |
|
|
|
@RequiresPermissions(controllerName + ":" + PermissionConstants.LIST_PERMISSION) |
|
|
|
// @RequiresPermissions(controllerName + ":" + PermissionConstants.LIST_PERMISSION) |
|
|
|
public Response index(@RequestBody(required = false) UserAdminQuery query) { |
|
|
|
return userAdminService.getList(query); |
|
|
|
} |
|
|
@@ -52,7 +52,7 @@ public class UserAdminController extends FrontBaseController { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@PostMapping("/add") |
|
|
|
@RequiresPermissions(controllerName + ":" + PermissionConstants.ADD_PERMISSION) |
|
|
|
// @RequiresPermissions(controllerName + ":" + PermissionConstants.ADD_PERMISSION) |
|
|
|
public Response add(@RequestBody(required = true) @Valid UserAdmin entity, BindingResult bindingResult) { |
|
|
|
if (bindingResult.hasErrors()) { |
|
|
|
String message = bindingResult.getFieldError().getDefaultMessage(); |
|
|
@@ -68,7 +68,7 @@ public class UserAdminController extends FrontBaseController { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@GetMapping("/info") |
|
|
|
@RequiresPermissions(controllerName + ":" + PermissionConstants.EDIT_PERMISSION) |
|
|
|
// @RequiresPermissions(controllerName + ":" + PermissionConstants.EDIT_PERMISSION) |
|
|
|
public Response info(Integer id) { |
|
|
|
return userAdminService.info(id); |
|
|
|
} |
|
|
@@ -81,7 +81,7 @@ public class UserAdminController extends FrontBaseController { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@PostMapping("/edit") |
|
|
|
@RequiresPermissions(controllerName + ":" + PermissionConstants.EDIT_PERMISSION) |
|
|
|
// @RequiresPermissions(controllerName + ":" + PermissionConstants.EDIT_PERMISSION) |
|
|
|
public Response edit(@RequestBody @Valid UserAdmin entity, BindingResult bindingResult) { |
|
|
|
if (bindingResult.hasErrors()) { |
|
|
|
String message = bindingResult.getFieldError().getDefaultMessage(); |
|
|
@@ -97,7 +97,7 @@ public class UserAdminController extends FrontBaseController { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@PostMapping("/drop") |
|
|
|
@RequiresPermissions(controllerName + ":" + PermissionConstants.REMOVE_PERMISSION) |
|
|
|
// @RequiresPermissions(controllerName + ":" + PermissionConstants.REMOVE_PERMISSION) |
|
|
|
public Response drop(Integer id) { |
|
|
|
return userAdminService.drop(id); |
|
|
|
} |
|
|
@@ -109,7 +109,7 @@ public class UserAdminController extends FrontBaseController { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@PostMapping("/setStatus") |
|
|
|
@RequiresPermissions(controllerName + ":" + PermissionConstants.STATUS_PERMISSION) |
|
|
|
// @RequiresPermissions(controllerName + ":" + PermissionConstants.STATUS_PERMISSION) |
|
|
|
public Response setStatus(@RequestBody UserAdmin entity) { |
|
|
|
return userAdminService.setStatus(entity); |
|
|
|
} |
|
|
@@ -121,7 +121,7 @@ public class UserAdminController extends FrontBaseController { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@PostMapping("/resetPwd") |
|
|
|
@RequiresPermissions(controllerName + ":" + PermissionConstants.PASSWORD_PERMISSION) |
|
|
|
// @RequiresPermissions(controllerName + ":" + PermissionConstants.PASSWORD_PERMISSION) |
|
|
|
public Response resetPwd(@RequestBody UserAdmin entity) { |
|
|
|
return userAdminService.resetPwd(entity); |
|
|
|
} |