|
|
@ -69,7 +69,7 @@ public class SysUserController extends BaseController {
|
|
|
|
return getDataTable(list);
|
|
|
|
return getDataTable(list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
|
|
|
|
// @Log(title = "用户管理", businessType = BusinessType.EXPORT)
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:user:export')")
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:user:export')")
|
|
|
|
@PostMapping("/export")
|
|
|
|
@PostMapping("/export")
|
|
|
|
public void export(HttpServletResponse response, SysUser user) {
|
|
|
|
public void export(HttpServletResponse response, SysUser user) {
|
|
|
@ -78,7 +78,7 @@ public class SysUserController extends BaseController {
|
|
|
|
util.exportExcel(response, list, "用户数据");
|
|
|
|
util.exportExcel(response, list, "用户数据");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Log(title = "用户管理", businessType = BusinessType.IMPORT)
|
|
|
|
// @Log(title = "用户管理", businessType = BusinessType.IMPORT)
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:user:import')")
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:user:import')")
|
|
|
|
@PostMapping("/importData")
|
|
|
|
@PostMapping("/importData")
|
|
|
|
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
|
|
|
|
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
|
|
|
@ -119,7 +119,7 @@ public class SysUserController extends BaseController {
|
|
|
|
* 新增用户
|
|
|
|
* 新增用户
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:user:add')")
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:user:add')")
|
|
|
|
@Log(title = "用户管理", businessType = BusinessType.INSERT)
|
|
|
|
// @Log(title = "用户管理", businessType = BusinessType.INSERT)
|
|
|
|
@PostMapping
|
|
|
|
@PostMapping
|
|
|
|
public AjaxResult add(@Validated @RequestBody SysUser user) {
|
|
|
|
public AjaxResult add(@Validated @RequestBody SysUser user) {
|
|
|
|
if (!userService.checkUserNameUnique(user)) {
|
|
|
|
if (!userService.checkUserNameUnique(user)) {
|
|
|
@ -141,7 +141,7 @@ public class SysUserController extends BaseController {
|
|
|
|
* 修改用户
|
|
|
|
* 修改用户
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:user:edit')")
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:user:edit')")
|
|
|
|
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
|
|
|
// @Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
|
|
|
@PutMapping
|
|
|
|
@PutMapping
|
|
|
|
public AjaxResult edit(@Validated @RequestBody SysUser user) {
|
|
|
|
public AjaxResult edit(@Validated @RequestBody SysUser user) {
|
|
|
|
userService.checkUserAllowed(user);
|
|
|
|
userService.checkUserAllowed(user);
|
|
|
@ -161,7 +161,7 @@ public class SysUserController extends BaseController {
|
|
|
|
* 删除用户
|
|
|
|
* 删除用户
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:user:remove')")
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:user:remove')")
|
|
|
|
@Log(title = "用户管理", businessType = BusinessType.DELETE)
|
|
|
|
// @Log(title = "用户管理", businessType = BusinessType.DELETE)
|
|
|
|
@DeleteMapping("/{userIds}")
|
|
|
|
@DeleteMapping("/{userIds}")
|
|
|
|
public AjaxResult remove(@PathVariable Long[] userIds) {
|
|
|
|
public AjaxResult remove(@PathVariable Long[] userIds) {
|
|
|
|
if (ArrayUtils.contains(userIds, getUserId())) {
|
|
|
|
if (ArrayUtils.contains(userIds, getUserId())) {
|
|
|
@ -174,7 +174,7 @@ public class SysUserController extends BaseController {
|
|
|
|
* 重置密码
|
|
|
|
* 重置密码
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:user:resetPwd')")
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:user:resetPwd')")
|
|
|
|
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
|
|
|
// @Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
|
|
|
@PutMapping("/resetPwd")
|
|
|
|
@PutMapping("/resetPwd")
|
|
|
|
public AjaxResult resetPwd(@RequestBody SysUser user) {
|
|
|
|
public AjaxResult resetPwd(@RequestBody SysUser user) {
|
|
|
|
userService.checkUserAllowed(user);
|
|
|
|
userService.checkUserAllowed(user);
|
|
|
@ -188,7 +188,7 @@ public class SysUserController extends BaseController {
|
|
|
|
* 状态修改
|
|
|
|
* 状态修改
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:user:edit')")
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:user:edit')")
|
|
|
|
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
|
|
|
// @Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
|
|
|
@PutMapping("/changeStatus")
|
|
|
|
@PutMapping("/changeStatus")
|
|
|
|
public AjaxResult changeStatus(@RequestBody SysUser user) {
|
|
|
|
public AjaxResult changeStatus(@RequestBody SysUser user) {
|
|
|
|
userService.checkUserAllowed(user);
|
|
|
|
userService.checkUserAllowed(user);
|
|
|
@ -215,7 +215,7 @@ public class SysUserController extends BaseController {
|
|
|
|
* 用户授权角色
|
|
|
|
* 用户授权角色
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:user:edit')")
|
|
|
|
// @PreAuthorize("@ss.hasPermi('system:user:edit')")
|
|
|
|
@Log(title = "用户管理", businessType = BusinessType.GRANT)
|
|
|
|
// @Log(title = "用户管理", businessType = BusinessType.GRANT)
|
|
|
|
@PutMapping("/authRole")
|
|
|
|
@PutMapping("/authRole")
|
|
|
|
public AjaxResult insertAuthRole(Long userId, Long[] roleIds) {
|
|
|
|
public AjaxResult insertAuthRole(Long userId, Long[] roleIds) {
|
|
|
|
userService.checkUserDataScope(userId);
|
|
|
|
userService.checkUserDataScope(userId);
|
|
|
|