优化业务/系统字典功能,数据类型数量可改变,可任意组合菜单(作用域必须单独),页面自动设定权限,组合菜单时数据类型超过1种,列表页面条件搜索添加数据类型条件。
修订校验时浏览器的兼容问题,
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
LEFT JOIN sys_dict_info p ON p.sys_dict_id = s.parent_id
|
||||
</sql>
|
||||
|
||||
<!-- 查出所有 -->
|
||||
<!-- 查出所有 有效数据-->
|
||||
<select id="findAllDictList" resultType="sysDictInfo">
|
||||
SELECT
|
||||
<include refid="sysDictInfoColumns"/>
|
||||
@@ -59,10 +59,16 @@
|
||||
WHERE s.is_valid =1
|
||||
</select>
|
||||
|
||||
<!-- 查询顶层分页(==) -->
|
||||
<!-- 查询顶层分页 -->
|
||||
<select id="findTopDictList" resultMap="dictResultMap" parameterType="com.nis.domain.basics.SysDictInfo">
|
||||
SELECT * FROM sys_dict_info s WHERE s.is_valid=1
|
||||
|
||||
<if test="conditionType != null and conditionType.size()>0 " >
|
||||
AND s.item_type in
|
||||
<foreach collection="conditionType" item="singleType" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{singleType}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="itemCode != null and itemCode != '' " >
|
||||
AND s.item_code like '%${itemCode}%'
|
||||
</if>
|
||||
@@ -86,6 +92,13 @@
|
||||
</if>
|
||||
AND s.parent_id not in (
|
||||
SELECT s2.sys_dict_id FROM sys_dict_info s2 WHERE s2.is_valid=1
|
||||
<if test="conditionType != null and conditionType.size()>0 " >
|
||||
AND s2.item_type in
|
||||
<foreach collection="conditionType" item="singleType" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{singleType}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="itemCode != null and itemCode != '' " >
|
||||
AND s2.item_code like '%${itemCode}%'
|
||||
</if>
|
||||
@@ -119,70 +132,20 @@
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询顶层分页(!=) -->
|
||||
<select id="findTopDictListN" resultMap="dictResultMap" parameterType="com.nis.domain.basics.SysDictInfo">
|
||||
SELECT * FROM sys_dict_info s WHERE s.is_valid=1
|
||||
|
||||
|
||||
<if test="itemCode != null and itemCode != '' " >
|
||||
AND s.item_code like '%${itemCode}%'
|
||||
</if>
|
||||
<if test="itemValue!= null and itemValue != '' " >
|
||||
AND s.item_value like '%${itemValue}%'
|
||||
</if>
|
||||
<if test="itemType != null and itemType != '' " >
|
||||
AND s.item_type != ${itemType}
|
||||
</if>
|
||||
<if test="beginDate !=null" >
|
||||
AND s.create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="endDate !=null" >
|
||||
AND s.create_time <= #{endDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editBeginDate !=null" >
|
||||
AND edit_time >= #{editBeginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editEndDate !=null" >
|
||||
AND edit_time <= #{editEndDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
AND s.parent_id not in (
|
||||
SELECT s2.sys_dict_id FROM sys_dict_info s2 WHERE s2.is_valid=1
|
||||
<if test="itemCode != null and itemCode != '' " >
|
||||
AND s2.item_code like '%${itemCode}%'
|
||||
</if>
|
||||
<if test="itemValue!= null and itemValue != '' " >
|
||||
AND s2.item_value like '%${itemValue}%'
|
||||
</if>
|
||||
<if test="itemType != null and itemType != '' " >
|
||||
AND s2.item_type != ${itemType}
|
||||
</if>
|
||||
<if test="beginDate !=null" >
|
||||
AND s2.create_time >= #{beginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="endDate !=null" >
|
||||
AND s2.create_time <= #{endDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editBeginDate !=null" >
|
||||
AND edit_time >= #{editBeginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editEndDate !=null" >
|
||||
AND edit_time <= #{editEndDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
)
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY s.${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY s.create_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询所有(==) -->
|
||||
<!-- 查询所有符合条件列表 -->
|
||||
<select id="findAllSysDictInfo" resultMap="dictResultMap">
|
||||
SELECT * FROM sys_dict_info WHERE is_valid=1
|
||||
|
||||
<if test="sysDictInfo.conditionType != null and sysDictInfo.conditionType.size()>0 " >
|
||||
AND item_type in
|
||||
<foreach collection="sysDictInfo.conditionType" item="singleType" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{singleType}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="sysDictInfo.itemType != null and sysDictInfo.itemType != '' " >
|
||||
AND item_type = ${sysDictInfo.itemType}
|
||||
</if>
|
||||
@@ -213,41 +176,6 @@
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<!-- 查询所有(!=) -->
|
||||
<select id="findAllSysDictInfoN" resultMap="dictResultMap">
|
||||
SELECT * FROM sys_dict_info WHERE is_valid=1
|
||||
|
||||
<if test="sysDictInfo.itemType != null and sysDictInfo.itemType != '' " >
|
||||
AND item_type = ${sysDictInfo.itemType}
|
||||
</if>
|
||||
<if test="sysDictInfo.itemCode != null and sysDictInfo.itemCode != '' " >
|
||||
AND item_code like '%${sysDictInfo.itemCode}%'
|
||||
</if>
|
||||
<if test="sysDictInfo.itemValue!= null and sysDictInfo.itemValue != '' " >
|
||||
AND item_value like '%${sysDictInfo.itemValue}%'
|
||||
</if>
|
||||
<if test="sysDictInfo.beginDate !=null" >
|
||||
AND create_time >= #{sysDictInfo.beginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="sysDictInfo.endDate !=null" >
|
||||
AND create_time <= #{sysDictInfo.endDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="sysDictInfo.editBeginDate !=null" >
|
||||
AND edit_time >= #{sysDictInfo.editBeginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="sysDictInfo.editEndDate !=null" >
|
||||
AND edit_time <= #{sysDictInfo.editEndDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="orderBy != null and orderBy != ''">
|
||||
ORDER BY ${orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY create_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<!-- 根据主键查询字典详细信息 -->
|
||||
|
||||
<select id="getDictById" resultType="com.nis.domain.basics.SysDictInfo">
|
||||
|
||||
Reference in New Issue
Block a user