|
|
@ -96,7 +96,7 @@ public class HighUserController { |
|
|
|
@RequestMapping(value = "/forbiddenUser", method = RequestMethod.GET) |
|
|
|
@RequestMapping(value = "/forbiddenUser", method = RequestMethod.GET) |
|
|
|
@ResponseBody |
|
|
|
@ResponseBody |
|
|
|
@ApiOperation(value = "禁用账号") |
|
|
|
@ApiOperation(value = "禁用账号") |
|
|
|
public ResponseData updatePosition(@RequestParam(value = "userId" , required = true) Long userId) { |
|
|
|
public ResponseData forbiddenUser(@RequestParam(value = "userId" , required = true) Long userId) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
HighUser highUser = highUserService.findByUserId(userId); |
|
|
|
HighUser highUser = highUserService.findByUserId(userId); |
|
|
@ -106,7 +106,38 @@ public class HighUserController { |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_USER_ERROR, ""); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_USER_ERROR, ""); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
highUser.setStatus(0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
highUserService.updateUser(highUser); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success("禁用成功"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
log.error("BsPositionController --> addPosition() error!", e); |
|
|
|
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/updateUser", method = RequestMethod.POST) |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
|
|
@ApiOperation(value = "修改用户") |
|
|
|
|
|
|
|
public ResponseData updateUser(@RequestBody HighUser reqBody) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
|
|
|
reqBody.getId() == null |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HighUser highUser = highUserService.findByUserId(reqBody.getId()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (highUser == null) { |
|
|
|
|
|
|
|
log.error("HighUserController --> updateUser() error!"); |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_USER_ERROR, ""); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
highUserService.updateUser(reqBody); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success("修改成功"); |
|
|
|
return ResponseMsgUtil.success("修改成功"); |
|
|
|
|
|
|
|
|
|
|
|