mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-11-05 08:57:12 +08:00
优化:优化校验工具类的使用及部分模板文本写法
1.优化校验工具类,支持传入 {} 模板文本
2.校验工具类增加 throwIf 重载方法,适合于 boolean 类型参数的情况
3.优化一些模板文本的写法
4.优化一些其他细节
This commit is contained in:
@@ -208,7 +208,7 @@ public abstract class BaseServiceImpl<M extends BaseMapper<T>, T extends BaseDO,
|
||||
*/
|
||||
protected T getById(Object id) {
|
||||
T entity = baseMapper.selectById(Convert.toStr(id));
|
||||
CheckUtils.throwIfNull(entity, ClassUtil.getClassName(entityClass, true), "ID", id);
|
||||
CheckUtils.throwIfNotExists(entity, ClassUtil.getClassName(entityClass, true), "ID", id);
|
||||
return entity;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user