|
@@ -208,7 +208,11 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|
|
}
|
|
|
|
|
|
// 新增
|
|
|
- UserEntity userEntity = new UserEntity();
|
|
|
+ UserEntity userEntity =this.getByLoginName(user.getLoginName());
|
|
|
+ if(userEntity!=null){
|
|
|
+ throw new ParameterException("用户已存在");
|
|
|
+ }
|
|
|
+ userEntity = new UserEntity();
|
|
|
userEntity.setRole(user.getRole());
|
|
|
userEntity.setLoginName(user.getLoginName());
|
|
|
userEntity.setName(user.getLoginName());
|