Commit 159cdb8f authored by litengwei's avatar litengwei

代码扫描问题修改

parent d82b1899
...@@ -1664,6 +1664,7 @@ ...@@ -1664,6 +1664,7 @@
GROUP BY GROUP BY
a.sequenceNbr a.sequenceNbr
ORDER BY a.personStatus DESC ORDER BY a.personStatus DESC
LIMIT #{map.pageNum}, #{map.pageSize} LIMIT #{map.pageNum}, #{map.pageSize}
</select> </select>
...@@ -1718,6 +1719,7 @@ ...@@ -1718,6 +1719,7 @@
a.biz_org_name IS NOT NULL a.biz_org_name IS NOT NULL
AND a.is_delete = 0 AND a.is_delete = 0
AND a.biz_org_type = 'PERSON' 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='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> <if test='peopleTypeCode != null and peopleTypeCode != ""'>and a.peopleType like concat ('%', #{peopleTypeCode},'%')</if>
</select> </select>
......
...@@ -82,6 +82,25 @@ public class PluginInterceptor implements Interceptor { ...@@ -82,6 +82,25 @@ public class PluginInterceptor implements Interceptor {
ReflectionUtils.makeAccessible(field); ReflectionUtils.makeAccessible(field);
field.set(boundSql, sql); field.set(boundSql, sql);
return executor.query(mappedStatement, parameter, rowBounds, resultHandler, cacheKey, boundSql); 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 { } else {
return invocation.proceed(); return invocation.proceed();
} }
......
...@@ -6984,10 +6984,10 @@ ...@@ -6984,10 +6984,10 @@
<if test="sortField != null and sortField != ''"> <if test="sortField != null and sortField != ''">
<choose> <choose>
<when test="sortOrder == 'ascend'"> <when test="sortOrder == 'ascend'">
${sortField} ASC _sortField ASC
</when> </when>
<otherwise> <otherwise>
${sortField} DESC _sortField DESC
</otherwise> </otherwise>
</choose> </choose>
</if> </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