融合冲突,提交本地

This commit is contained in:
zhangshilin
2018-03-08 19:14:04 +08:00
parent 7a1452df66
commit c0472494ec

View File

@@ -5,11 +5,10 @@
<resultMap id="dictResultMap" type="com.nis.domain.basics.ServiceDictInfo" >
<id column="service_dict_id" property="serviceDictId" jdbcType="INTEGER" />
<result column="item_type" property="itemType" jdbcType="INTEGER" />
<result column="item_code" property="itemCode" jdbcType="VARCHAR" />
<result column="item_code" property="itemCode" jdbcType="INTEGER" />
<result column="item_value" property="itemValue" jdbcType="VARCHAR" />
<result column="item_desc" property="itemDesc" jdbcType="VARCHAR" />
<result column="is_leaf" property="isLeaf" jdbcType="INTEGER" />
<result column="level_no" property="levelNo" jdbcType="INTEGER" />
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
@@ -47,7 +46,6 @@
s.item_desc AS itemDesc,
s.parent_id AS "parent.serviceDictId",
s.is_leaf AS isLeaf,
s.level_no AS levelNo,
s.is_valid AS isValid,
s.creator_id AS "serviceDictCreator.id",
s.create_time AS createTime,
@@ -139,7 +137,7 @@
<include refid="serviceDictInfoColumns"/>
FROM service_dict_info s
<include refid="menuJoins"/>
WHERE s.is_valid =1 AND s.parent_id != 0
WHERE s.is_valid =1
</select>
<!-- 查询所有非叶子配置 -->
@@ -148,151 +146,72 @@
<include refid="serviceDictInfoColumns"/>
FROM service_dict_info s
WHERE s.is_valid = 1 AND s.is_leaf = 0 AND item_type = #{itemType}
ORDER BY s.create_time desc
</select>
<!-- 条件查询顶层分页(==) -->
<select id="findDictTopSearchList" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
SELECT * FROM service_dict_info s WHERE s.is_valid=1
<!-- 条件查询分页(==) -->
<select id="findDictSearchList" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
SELECT * FROM service_dict_info WHERE 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 &gt;= #{beginDate,jdbcType=TIMESTAMP}
</if>
<if test="endDate !=null" >
AND s.create_time &lt;= DATE_ADD(#{endDate,jdbcType=TIMESTAMP},INTERVAL 1 DAY)
</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 &gt;= #{beginDate,jdbcType=TIMESTAMP}
</if>
<if test="endDate !=null" >
AND s2.create_time &lt;= DATE_ADD(#{endDate,jdbcType=TIMESTAMP},INTERVAL 1 DAY)
</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="findDictTopSearchListN" 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 &gt;= #{beginDate,jdbcType=TIMESTAMP}
</if>
<if test="endDate !=null" >
AND s.create_time &lt;= DATE_ADD(#{endDate,jdbcType=TIMESTAMP},INTERVAL 1 DAY)
</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 &gt;= #{beginDate,jdbcType=TIMESTAMP}
</if>
<if test="endDate !=null" >
AND s2.create_time &lt;= DATE_ADD(#{endDate,jdbcType=TIMESTAMP},INTERVAL 1 DAY)
</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="findAllDictSearchList" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
SELECT * FROM service_dict_info WHERE is_valid=1
<if test="itemValue != null and itemValue != '' " >
AND item_value like '%${itemValue}%'
<if test="itemType != null and itemType != '' " >
AND item_type like '%${itemType}%'
</if>
<if test="itemCode != null and itemCode != '' " >
AND item_code like '%${itemCode}%'
</if>
<if test="itemType != null and itemType != '' " >
AND item_type = #{itemType}
<if test="itemValue!= null and itemValue != '' " >
AND item_value like '%${itemValue}%'
</if>
<if test="beginDate !=null" >
AND create_time &gt;= #{beginDate,jdbcType=TIMESTAMP}
</if>
<if test="endDate !=null" >
AND create_time &lt;= DATE_ADD(#{endDate,jdbcType=TIMESTAMP},INTERVAL 1 DAY)
</if>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
ORDER BY create_time desc
</otherwise>
</choose>
</select>
<!-- 条件查询所有列表 (!=)-->
<select id="findAllDictSearchListN" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
SELECT * FROM service_dict_info WHERE is_valid=1
<!-- 条件查询分页(!=) -->
<select id="findDictSearchListN" resultMap="dictResultMap" parameterType="com.nis.domain.basics.ServiceDictInfo">
SELECT * FROM service_dict_info WHERE is_valid=1
<if test="itemValue != null and itemValue != '' " >
AND item_value like '%${itemValue}%'
</if>
<if test="itemCode != null and itemCode != '' " >
AND item_code like '%${itemCode}%'
</if>
<if test="itemValue!= null and itemValue != '' " >
AND item_value like '%${itemValue}%'
</if>
<if test="itemType != null and itemType != '' " >
AND item_type != #{itemType}
AND item_type != ${itemType}
</if>
<if test="beginDate !=null" >
AND create_time &gt;= #{beginDate,jdbcType=TIMESTAMP}
</if>
<if test="endDate !=null" >
AND create_time &lt;= DATE_ADD(#{endDate,jdbcType=TIMESTAMP},INTERVAL 1 DAY)
</if>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
ORDER BY create_time desc
</otherwise>
</choose>
</select>
<!-- 根据主键查询字典详细信息 -->
@@ -327,10 +246,10 @@
<!-- 新增字典信息 -->
<insert id="insertDict" parameterType="com.nis.domain.basics.ServiceDictInfo" useGeneratedKeys="true" keyProperty="id" >
insert into service_dict_info (item_type, item_code, item_value, item_desc, parent_id, is_leaf, level_no, is_valid, creator_id, create_time, editor_id, edit_time)
insert into service_dict_info (item_type, item_code, item_value, item_desc, parent_id, is_leaf, is_valid, creator_id, create_time, editor_id, edit_time)
values ( #{itemType,jdbcType=INTEGER}, #{itemCode,jdbcType=INTEGER},
#{itemValue,jdbcType=VARCHAR}, #{itemDesc,jdbcType=VARCHAR},
#{parent.serviceDictId,jdbcType=INTEGER}, #{isLeaf,jdbcType=INTEGER},#{levelNo,jdbcType=VARCHAR}, #{isValid,jdbcType=INTEGER},
#{parent.serviceDictId,jdbcType=INTEGER}, #{isLeaf,jdbcType=INTEGER}, #{isValid,jdbcType=INTEGER},
#{serviceDictCreator.id,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{serviceDictEditor.id,jdbcType=INTEGER}, #{editTime,jdbcType=TIMESTAMP})
</insert>
@@ -347,19 +266,11 @@
s.item_desc = #{itemDesc},
s.parent_id = #{parent.serviceDictId},
s.is_leaf = #{isLeaf},
s.level_no = #{levelNo},
s.creator_id = #{serviceDictCreator.id},
s.editor_id = #{serviceDictEditor.id},
s.edit_time = #{editTime}
WHERE s.service_dict_id = #{serviceDictId}
</update>
<!-- 保存层级 -->
<update id="updateLevelNo">
UPDATE service_dict_info s SET
s.level_no = #{levelNo}
WHERE s.service_dict_id = #{serviceDictId}
</update>
<!-- 删除 -->
@@ -388,5 +299,4 @@
</mapper>