Commit 8aa4d2be authored by lee_mingzhu's avatar lee_mingzhu

添加禁用用户的接口,给数据部用

parent 9ad4c8a2
...@@ -352,5 +352,19 @@ public class InnerController { ...@@ -352,5 +352,19 @@ public class InnerController {
return JsonResult.buildSuccessResult("success", wechatUserInfo.getOpenId()); return JsonResult.buildSuccessResult("success", wechatUserInfo.getOpenId());
} }
@RequestMapping("/user/disable")
public JsonResult disableUser(Long userId) {
if(null == userId || 0L == userId) {
return JsonResult.buildErrorStateResult("userId不能为空", null);
}
User user = userService.findById(userId);
if(null == user) {
return JsonResult.buildErrorStateResult("未查询到该用户,用户id:" + userId, null);
}
user.setEnable(false);
user = userService.saveUser(user);
return JsonResult.buildSuccessResult("用户已禁用.", user.getEnable() == false);
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment