优化业务/系统字典功能,数据类型数量可改变,可任意组合菜单(作用域必须单独),页面自动设定权限,组合菜单时数据类型超过1种,列表页面条件搜索添加数据类型条件。
修订校验时浏览器的兼容问题,
This commit is contained in:
@@ -72,10 +72,16 @@
|
||||
|
||||
|
||||
|
||||
<!-- 查询顶层分页列表 (==)-->
|
||||
<!-- 查询顶层分页列表-->
|
||||
<select id="findTopDictList" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
|
||||
SELECT * FROM service_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>
|
||||
@@ -91,7 +97,7 @@
|
||||
<if test="endDate !=null" >
|
||||
AND s.create_time <= #{endDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editBeginDate !=null" >
|
||||
<if test="editBeginDate !=null" >
|
||||
AND edit_time >= #{editBeginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editEndDate !=null" >
|
||||
@@ -99,6 +105,13 @@
|
||||
</if>
|
||||
AND s.parent_id not in (
|
||||
SELECT s2.service_dict_id FROM service_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>
|
||||
@@ -130,72 +143,20 @@
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询顶层分页列表 (!=)-->
|
||||
<select id="findTopDictListN" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
|
||||
SELECT * FROM service_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.service_dict_id FROM service_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="findAllServiceDictInfo" resultMap="dictResultMap">
|
||||
SELECT * FROM service_dict_info WHERE is_valid=1
|
||||
|
||||
<if test="serviceDictInfo.conditionType != null and serviceDictInfo.conditionType.size()>0 " >
|
||||
AND item_type in
|
||||
<foreach collection="serviceDictInfo.conditionType" item="singleType" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{singleType}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="serviceDictInfo.itemValue != null and serviceDictInfo.itemValue != '' " >
|
||||
AND item_value like '%${serviceDictInfo.itemValue}%'
|
||||
</if>
|
||||
@@ -227,42 +188,7 @@
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<!-- 查询所有列表 (!=)-->
|
||||
<select id="findAllServiceDictInfoN" resultMap="dictResultMap">
|
||||
SELECT * FROM service_dict_info WHERE is_valid=1
|
||||
|
||||
<if test="serviceDictInfo.itemValue != null and serviceDictInfo.itemValue != '' " >
|
||||
AND item_value like '%${serviceDictInfo.itemValue}%'
|
||||
</if>
|
||||
<if test="serviceDictInfo.itemCode != null and serviceDictInfo.itemCode != '' " >
|
||||
AND item_code like '%${serviceDictInfo.itemCode}%'
|
||||
</if>
|
||||
<if test="serviceDictInfo.itemType != null and serviceDictInfo.itemType != '' " >
|
||||
AND item_type != #{serviceDictInfo.itemType}
|
||||
</if>
|
||||
<if test="serviceDictInfo.beginDate !=null" >
|
||||
AND create_time >= #{serviceDictInfo.beginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceDictInfo.endDate !=null" >
|
||||
AND create_time <= #{serviceDictInfo.endDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceDictInfo.editBeginDate !=null" >
|
||||
AND edit_time >= #{serviceDictInfo.editBeginDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceDictInfo.editEndDate !=null" >
|
||||
AND edit_time <= #{serviceDictInfo.editEndDate,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="orderBy != null and orderBy != ''">
|
||||
ORDER BY ${orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY create_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<!-- 查出所有 -->
|
||||
<!-- 查出所有有效(父级(!=0))字典信息 -->
|
||||
<select id="findAllDictList" resultType="serviceDictInfo">
|
||||
SELECT
|
||||
<include refid="serviceDictInfoColumns"/>
|
||||
|
||||
Reference in New Issue
Block a user