Commit 3cf0c9fd authored by 廖旭伟's avatar 廖旭伟

新增用户时对用户名唯一性进行校验

parent c1a15629
......@@ -106,6 +106,10 @@ public class UserServiceImpl extends AbstractCRUDServiceImpl<UserDao, UserEntity
@Override
protected void saveBefore(UserEntity entity, Context context) throws AppException {
UserEntity sysUser = this.findByLoginName(entity.getLoginName());
if(sysUser!=null){
throw new AppException("用户名重复");
}
this.doHandlerUser(entity);
}
......
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