优化:优化校验工具类的使用及部分模板文本写法

1.优化校验工具类,支持传入 {} 模板文本
2.校验工具类增加 throwIf 重载方法,适合于 boolean 类型参数的情况
3.优化一些模板文本的写法
4.优化一些其他细节
This commit is contained in:
2023-03-20 20:44:52 +08:00
parent 139cb337d7
commit 6d3ba478e9
13 changed files with 265 additions and 177 deletions

View File

@@ -135,7 +135,7 @@ public class LogServiceImpl implements LogService {
@Override
public SystemLogDetailVO get(Long id) {
LogDO logDO = logMapper.selectById(id);
CheckUtils.throwIfNull(logDO, "LogDO", "ID", id);
CheckUtils.throwIfNotExists(logDO, "LogDO", "ID", id);
SystemLogDetailVO detailVO = BeanUtil.copyProperties(logDO, SystemLogDetailVO.class);
this.fill(detailVO);