Commit 159cdb8f authored by litengwei's avatar litengwei

代码扫描问题修改

parent d82b1899
......@@ -1664,6 +1664,7 @@
GROUP BY
a.sequenceNbr
ORDER BY a.personStatus DESC
LIMIT #{map.pageNum}, #{map.pageSize}
</select>
......@@ -1718,6 +1719,7 @@
a.biz_org_name IS NOT NULL
AND a.is_delete = 0
AND a.biz_org_type = 'PERSON'
and fp.is_delete = 0
<if test='bizOrgCode!=null and bizOrgCode!=""'>and LEFT(a.biz_org_code,18) like concat (#{bizOrgCode},'%')</if>
<if test='peopleTypeCode != null and peopleTypeCode != ""'>and a.peopleType like concat ('%', #{peopleTypeCode},'%')</if>
</select>
......
......@@ -82,6 +82,25 @@ public class PluginInterceptor implements Interceptor {
ReflectionUtils.makeAccessible(field);
field.set(boundSql, sql);
return executor.query(mappedStatement, parameter, rowBounds, resultHandler, cacheKey, boundSql);
} else if ("com.yeejoin.equipmanage.mapper.FireFightingSystemMapper.getSystemInfoPage".equals(id)) {
//执行结果
HashMap<String, String> par = new LinkedHashMap<>();
if (parameter instanceof HashMap) {
par = (HashMap<String, String>) ((HashMap<?, ?>) parameter).get("sortField");
}
Iterator<String> iterator = par.keySet().stream().iterator();
while (iterator.hasNext()) {
String next = iterator.next();
sql = sql.replace("_sortField", next);
}
//通过反射修改sql语句
Field field = boundSql.getClass().getDeclaredField("sql");
ReflectionUtils.makeAccessible(field);
field.set(boundSql, sql);
return executor.query(mappedStatement, parameter, rowBounds, resultHandler, cacheKey, boundSql);
} else {
return invocation.proceed();
}
......
......@@ -6984,10 +6984,10 @@
<if test="sortField != null and sortField != ''">
<choose>
<when test="sortOrder == 'ascend'">
${sortField} ASC
_sortField ASC
</when>
<otherwise>
${sortField} DESC
_sortField DESC
</otherwise>
</choose>
</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment