工具类异常使用UtilException

pull/358/head
RuoYi 2021-12-21 13:55:55 +08:00
parent c44c280b21
commit 22881ccb59
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
package com.ruoyi.common.utils.sql;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.exception.UtilException;
import com.ruoyi.common.utils.StringUtils;
/**
@ -27,7 +27,7 @@ public class SqlUtil
{
if (StringUtils.isNotEmpty(value) && !isValidOrderBySql(value))
{
throw new BaseException("参数不符合规范,不能进行查询");
throw new UtilException("参数不符合规范,不能进行查询");
}
return value;
}
@ -54,7 +54,7 @@ public class SqlUtil
{
if (StringUtils.indexOfIgnoreCase(value, sqlKeywords[i]) > -1)
{
throw new BaseException("参数存在SQL注入风险");
throw new UtilException("参数存在SQL注入风险");
}
}
}

View File

@ -222,7 +222,7 @@ public class GenController extends BaseController
catch (Exception e)
{
logger.error(e.getMessage(), e);
return AjaxResult.error("创建表结构异常" + e.getMessage());
return AjaxResult.error("创建表结构异常[" + e.getMessage() + "]");
}
}