Browse Source

查询列表列 条件修复

master
[li_she] 5 years ago
parent
commit
b6bf258088
  1. 1
      src/main/resources/application-dev.yml
  2. 13
      src/main/resources/mapper/grid/GridTableDefaultDao.xml
  3. 3
      src/main/resources/mapper/grid/GridTableUserDao.xml

1
src/main/resources/application-dev.yml

@ -24,6 +24,7 @@ spring:
url-pattern: /druid/*
#login-username: admin
#login-password: admin
allow: ""
filter:
stat:
log-slow-sql: true

13
src/main/resources/mapper/grid/GridTableDefaultDao.xml

@ -31,7 +31,18 @@
ON (gtd.table_id = gtl.table_id AND gtd.column_prop = gtl.object_id
AND gtd.function_id = gtl.function_id AND gtl.language_code = #{languageCode})
WHERE gtd.table_id = #{tableId}
<where>
<if test="tableId != null and tableId != ''">
gtd.table_id = #{tableId}
</if>
<if test="status != null and status != ''">
and gtd.status = #{status}
</if>
<if test="functionId != null and functionId != ''">
and gtd.function_id = #{functionId}
</if>
</where>
ORDER BY gtd.sort_lv ASC
</select>

3
src/main/resources/mapper/grid/GridTableUserDao.xml

@ -46,6 +46,9 @@
<if test="status != null and status != ''">
and gtd.status = #{status}
</if>
<if test="functionId != null and functionId != ''">
and gtd.function_id = #{functionId}
</if>
</where>
ORDER BY gtd.sort_lv ASC

Loading…
Cancel
Save