feat: 更新默认密码,增加茶凉更新审核

This commit is contained in:
wangyu 2021-07-24 23:31:06 +08:00
parent bf3c20f937
commit 52f7c5668a
2 changed files with 3 additions and 2 deletions

View File

@ -173,7 +173,7 @@ public class WebSecurityConfig {
// 初始化用户
User user = new User();
user.setUsername("admin");
user.setPassword("Unicom@2020");
user.setPassword("Sxu@Unicom#2021");
user.setType(UserType.SUPER_ADMIN);
user.setEnable(true);
user.setApp(false);

View File

@ -243,9 +243,10 @@ public class BaseServiceImpl<T extends Domain> implements BaseService<T> {
@Override
public T updateSelectiveById(T entity) {
Assert.hasText(entity.getId(), "更新的主键不可为空!");
audit(entity);
Optional<T> saved = repository.findById(entity.getId());
Assert.isTrue(saved.isPresent(), "要更新的信息不存在!");
return updateById(CopyUtils.copyProps(entity, saved.get()));
return post(updateById(CopyUtils.copyProps(entity, saved.get())));
}
/**