优化业务/系统字典功能,数据类型数量可改变,可任意组合菜单(作用域必须单独),页面自动设定权限,组合菜单时数据类型超过1种,列表页面条件搜索添加数据类型条件。
修订校验时浏览器的兼容问题,
This commit is contained in:
@@ -13,34 +13,22 @@ import com.nis.web.dao.MyBatisDao;
|
||||
public interface ServiceDictInfoDao extends CrudDao<ServiceDictInfo> {
|
||||
|
||||
/**
|
||||
* 查询顶层字典列表(==)
|
||||
* 查询顶层字典列表
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
List<ServiceDictInfo> findTopDictList(ServiceDictInfo serviceDictInfo);
|
||||
/**
|
||||
* 查询顶层字典列表(!=)
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
List<ServiceDictInfo> findTopDictListN(ServiceDictInfo serviceDictInfo);
|
||||
/**
|
||||
* findAllServiceDictInfo
|
||||
*/
|
||||
/**
|
||||
* 查询所有字典列表(==)
|
||||
* 查询所有符合条件的字典列表
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
List<ServiceDictInfo> findAllServiceDictInfo(@Param("serviceDictInfo")ServiceDictInfo serviceDictInfo,@Param("orderBy")String orderBy);
|
||||
/**
|
||||
* 查询所有字典列表(!=)
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
List<ServiceDictInfo> findAllServiceDictInfoN(@Param("serviceDictInfo")ServiceDictInfo serviceDictInfo,@Param("orderBy")String orderBy);
|
||||
/**
|
||||
* 查出所有有效数据
|
||||
* 查出所有有效数据父级(!=0)
|
||||
*/
|
||||
List<ServiceDictInfo> findAllDictList(ServiceDictInfo serviceDictInfo);
|
||||
/**
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -14,30 +14,18 @@ public interface SysDictInfoDao extends CrudDao<SysDictInfo> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询顶层字典列表(==))
|
||||
* 查询顶层字典列表
|
||||
* @param sysDictInfo
|
||||
* @return
|
||||
*/
|
||||
List<SysDictInfo> findTopDictList(SysDictInfo sysDictInfo);
|
||||
/**
|
||||
* 查询顶层字典列表(!=)
|
||||
* @param sysDictInfo
|
||||
* @return
|
||||
*/
|
||||
List<SysDictInfo> findTopDictListN(SysDictInfo sysDictInfo);
|
||||
/**
|
||||
* 查询所有字典列表(含条件查询(==))
|
||||
* 查询所有符合条件的字典列表
|
||||
* @param sysDictInfo
|
||||
* @return
|
||||
*/
|
||||
List<SysDictInfo> findAllSysDictInfo(@Param("sysDictInfo")SysDictInfo sysDictInfo,@Param("orderBy")String orderBy);
|
||||
/**
|
||||
* 查询所有字典列表(含条件查询(!=))
|
||||
* @param sysDictInfo
|
||||
* @return
|
||||
*/
|
||||
List<SysDictInfo> findAllSysDictInfoN(@Param("sysDictInfo")SysDictInfo sysDictInfo,@Param("orderBy")String orderBy);
|
||||
/**
|
||||
/**
|
||||
* 查出所有有效数据
|
||||
* @param sysDictInfo
|
||||
* @return
|
||||
|
||||
@@ -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