|
@@ -68,6 +68,10 @@ public class UserController {
|
|
|
@LoginRequired
|
|
|
public RespR user(@RequestBody User user) {
|
|
|
user.setPassword(MD5Util.encrypt(user.getPassword()));
|
|
|
+ User user1 = userService.selectUserByUserName(user.getUserName());
|
|
|
+ if(null != user1){
|
|
|
+ return new RespR<>(Boolean.FALSE, "该用户已存在");
|
|
|
+ }
|
|
|
return new RespR<>(userService.saveUser(user));
|
|
|
}
|
|
|
|