Merge remote-tracking branch 'origin/master' into master

This commit is contained in:
Captain.B 2020-11-23 18:37:33 +08:00
commit 5058b5e08a
2 changed files with 13 additions and 0 deletions

View File

@ -318,6 +318,17 @@ public class UserService {
}
public void updateUser(User user) {
// todo 提取重复代码
if (StringUtils.isNotBlank(user.getEmail())) {
UserExample example = new UserExample();
UserExample.Criteria criteria = example.createCriteria();
criteria.andEmailEqualTo(user.getEmail());
criteria.andIdNotEqualTo(user.getId());
if (userMapper.countByExample(example) > 0) {
MSException.throwException(Translator.get("user_email_already_exists"));
}
}
user.setUpdateTime(System.currentTimeMillis());
userMapper.updateByPrimaryKeySelective(user);
// 禁用用户之后剔除在线用户

View File

@ -293,6 +293,8 @@
this.projectId = data[0].id;
this.projectName = data[0].name;
this.search();
//
this.getProjectNode(this.projectId)
}
})
}