|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PreAuthorize("@ss.hasPermi('system:user:edit')") | 
|---|
|  |  |  | @Log(title = "用户管理", businessType = BusinessType.UPDATE) | 
|---|
|  |  |  | @PutMapping | 
|---|
|  |  |  | @PostMapping("/edit") | 
|---|
|  |  |  | public AjaxResult edit(@Validated @RequestBody SysUser user) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | userService.checkUserAllowed(user); | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PreAuthorize("@ss.hasPermi('system:user:remove')") | 
|---|
|  |  |  | @Log(title = "用户管理", businessType = BusinessType.DELETE) | 
|---|
|  |  |  | @DeleteMapping("/{userIds}") | 
|---|
|  |  |  | @GetMapping("/remove/{userIds}") | 
|---|
|  |  |  | public AjaxResult remove(@PathVariable Long[] userIds) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | if (ArrayUtils.contains(userIds, getUserId())) | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PreAuthorize("@ss.hasPermi('system:user:resetPwd')") | 
|---|
|  |  |  | @Log(title = "用户管理", businessType = BusinessType.UPDATE) | 
|---|
|  |  |  | @PutMapping("/resetPwd") | 
|---|
|  |  |  | @PostMapping("/resetPwd") | 
|---|
|  |  |  | public AjaxResult resetPwd(@RequestBody SysUser user) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | userService.checkUserAllowed(user); | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PreAuthorize("@ss.hasPermi('system:user:edit')") | 
|---|
|  |  |  | @Log(title = "用户管理", businessType = BusinessType.UPDATE) | 
|---|
|  |  |  | @PutMapping("/changeStatus") | 
|---|
|  |  |  | @PostMapping("/changeStatus") | 
|---|
|  |  |  | public AjaxResult changeStatus(@RequestBody SysUser user) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | userService.checkUserAllowed(user); | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PreAuthorize("@ss.hasPermi('system:user:edit')") | 
|---|
|  |  |  | @Log(title = "用户管理", businessType = BusinessType.GRANT) | 
|---|
|  |  |  | @PutMapping("/authRole") | 
|---|
|  |  |  | public AjaxResult insertAuthRole(Long userId, Long[] roleIds) | 
|---|
|  |  |  | @PostMapping("/authRole/insertAuthRole") | 
|---|
|  |  |  | public AjaxResult insertAuthRole(@RequestBody SysUser user) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | userService.insertUserAuth(userId, roleIds); | 
|---|
|  |  |  | userService.insertUserAuth(user.getUserId(), user.getRoleIds()); | 
|---|
|  |  |  | return success(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|