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

This commit is contained in:
wangyu 2021-07-25 00:10:10 +08:00
parent 52f7c5668a
commit da892f6bda

View File

@ -243,10 +243,9 @@ 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 post(updateById(CopyUtils.copyProps(entity, saved.get())));
return updateById(CopyUtils.copyProps(entity, saved.get()));
}
/**
@ -353,6 +352,7 @@ public class BaseServiceImpl<T extends Domain> implements BaseService<T> {
/**
* 后置审查
*
* @param entity 实体
* @return 结果
*/