|
@@ -1,44 +1,57 @@
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
<!DOCTYPE mapper
|
|
<!DOCTYPE mapper
|
|
|
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.doc.biz.mapper.DocDirLevelMapper">
|
|
<mapper namespace="com.doc.biz.mapper.DocDirLevelMapper">
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<resultMap type="DocDirLevel" id="DocDirLevelResult">
|
|
<resultMap type="DocDirLevel" id="DocDirLevelResult">
|
|
|
- <result property="levelId" column="LEVEL_ID" />
|
|
|
|
|
- <result property="levelName" column="LEVEL_NAME" />
|
|
|
|
|
- <result property="levelCode" column="LEVEL_CODE" />
|
|
|
|
|
- <result property="levelRoles" column="LEVEL_ROLES" />
|
|
|
|
|
- <result property="createBy" column="CREATE_BY" />
|
|
|
|
|
- <result property="createTime" column="CREATE_TIME" />
|
|
|
|
|
- <result property="updateBy" column="UPDATE_BY" />
|
|
|
|
|
- <result property="updateTime" column="UPDATE_TIME" />
|
|
|
|
|
- <result property="remark" column="REMARK" />
|
|
|
|
|
|
|
+ <result property="levelId" column="LEVEL_ID"/>
|
|
|
|
|
+ <result property="levelName" column="LEVEL_NAME"/>
|
|
|
|
|
+ <result property="levelCode" column="LEVEL_CODE"/>
|
|
|
|
|
+ <result property="levelRoles" column="LEVEL_ROLES"/>
|
|
|
|
|
+ <result property="createBy" column="CREATE_BY"/>
|
|
|
|
|
+ <result property="createTime" column="CREATE_TIME"/>
|
|
|
|
|
+ <result property="updateBy" column="UPDATE_BY"/>
|
|
|
|
|
+ <result property="updateTime" column="UPDATE_TIME"/>
|
|
|
|
|
+ <result property="remark" column="REMARK"/>
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectDocDirLevelVo">
|
|
<sql id="selectDocDirLevelVo">
|
|
|
- select LEVEL_ID, LEVEL_NAME, LEVEL_CODE, LEVEL_ROLES, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, REMARK from doc_dir_level
|
|
|
|
|
|
|
+ select LEVEL_ID,
|
|
|
|
|
+ LEVEL_NAME,
|
|
|
|
|
+ LEVEL_CODE,
|
|
|
|
|
+ LEVEL_ROLES,
|
|
|
|
|
+ CREATE_BY,
|
|
|
|
|
+ CREATE_TIME,
|
|
|
|
|
+ UPDATE_BY,
|
|
|
|
|
+ UPDATE_TIME,
|
|
|
|
|
+ REMARK
|
|
|
|
|
+ from doc_dir_level
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectDocDirLevelList" parameterType="DocDirLevel" resultMap="DocDirLevelResult">
|
|
<select id="selectDocDirLevelList" parameterType="DocDirLevel" resultMap="DocDirLevelResult">
|
|
|
<include refid="selectDocDirLevelVo"/>
|
|
<include refid="selectDocDirLevelVo"/>
|
|
|
- <where>
|
|
|
|
|
- <if test="levelName != null and levelName != ''"> and LEVEL_NAME like concat('%', #{levelName}, '%')</if>
|
|
|
|
|
- <if test="levelCode != null and levelCode != ''"> and LEVEL_CODE = #{levelCode}</if>
|
|
|
|
|
- <if test="levelRoles != null and levelRoles != ''"> and LEVEL_ROLES = #{levelRoles}</if>
|
|
|
|
|
- <if test="createBy != null and createBy != ''"> and CREATE_BY = #{createBy}</if>
|
|
|
|
|
- <if test="createTime != null "> and CREATE_TIME = #{createTime}</if>
|
|
|
|
|
- <if test="updateBy != null and updateBy != ''"> and UPDATE_BY = #{updateBy}</if>
|
|
|
|
|
- <if test="updateTime != null "> and UPDATE_TIME = #{updateTime}</if>
|
|
|
|
|
- <if test="remark != null and remark != ''"> and REMARK = #{remark}</if>
|
|
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="levelName != null and levelName != ''">and LEVEL_NAME like concat('%', #{levelName}, '%')</if>
|
|
|
|
|
+ <if test="levelCode != null and levelCode != ''">and LEVEL_CODE = #{levelCode}</if>
|
|
|
|
|
+ <if test="levelRoles != null and levelRoles != ''">and LEVEL_ROLES = #{levelRoles}</if>
|
|
|
|
|
+ <if test="createBy != null and createBy != ''">and CREATE_BY = #{createBy}</if>
|
|
|
|
|
+ <if test="createTime != null ">and CREATE_TIME = #{createTime}</if>
|
|
|
|
|
+ <if test="updateBy != null and updateBy != ''">and UPDATE_BY = #{updateBy}</if>
|
|
|
|
|
+ <if test="updateTime != null ">and UPDATE_TIME = #{updateTime}</if>
|
|
|
|
|
+ <if test="remark != null and remark != ''">and REMARK = #{remark}</if>
|
|
|
</where>
|
|
</where>
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<select id="selectDocDirLevelByLevelId" parameterType="Long" resultMap="DocDirLevelResult">
|
|
<select id="selectDocDirLevelByLevelId" parameterType="Long" resultMap="DocDirLevelResult">
|
|
|
<include refid="selectDocDirLevelVo"/>
|
|
<include refid="selectDocDirLevelVo"/>
|
|
|
where LEVEL_ID = #{levelId}
|
|
where LEVEL_ID = #{levelId}
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
|
|
+ <select id="selectDocDirLevelByLevelCode" resultType="com.doc.biz.domain.DocDirLevel">
|
|
|
|
|
+ <include refid="selectDocDirLevelVo"/>
|
|
|
|
|
+ where LEVEL_CODE = #{levelCode}
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
<insert id="insertDocDirLevel" parameterType="DocDirLevel" useGeneratedKeys="true" keyProperty="levelId">
|
|
<insert id="insertDocDirLevel" parameterType="DocDirLevel" useGeneratedKeys="true" keyProperty="levelId">
|
|
|
insert into doc_dir_level
|
|
insert into doc_dir_level
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -50,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateBy != null">UPDATE_BY,</if>
|
|
<if test="updateBy != null">UPDATE_BY,</if>
|
|
|
<if test="updateTime != null">UPDATE_TIME,</if>
|
|
<if test="updateTime != null">UPDATE_TIME,</if>
|
|
|
<if test="remark != null">REMARK,</if>
|
|
<if test="remark != null">REMARK,</if>
|
|
|
- </trim>
|
|
|
|
|
|
|
+ </trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="levelName != null">#{levelName},</if>
|
|
<if test="levelName != null">#{levelName},</if>
|
|
|
<if test="levelCode != null and levelCode != ''">#{levelCode},</if>
|
|
<if test="levelCode != null and levelCode != ''">#{levelCode},</if>
|
|
@@ -60,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
<if test="remark != null">#{remark},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
|
- </trim>
|
|
|
|
|
|
|
+ </trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
|
<update id="updateDocDirLevel" parameterType="DocDirLevel">
|
|
<update id="updateDocDirLevel" parameterType="DocDirLevel">
|
|
@@ -79,11 +92,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
<delete id="deleteDocDirLevelByLevelId" parameterType="Long">
|
|
<delete id="deleteDocDirLevelByLevelId" parameterType="Long">
|
|
|
- delete from doc_dir_level where LEVEL_ID = #{levelId}
|
|
|
|
|
|
|
+ delete
|
|
|
|
|
+ from doc_dir_level
|
|
|
|
|
+ where LEVEL_ID = #{levelId}
|
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
|
|
<delete id="deleteDocDirLevelByLevelIds" parameterType="String">
|
|
<delete id="deleteDocDirLevelByLevelIds" parameterType="String">
|
|
|
- delete from doc_dir_level where LEVEL_ID in
|
|
|
|
|
|
|
+ delete from doc_dir_level where LEVEL_ID in
|
|
|
<foreach item="levelId" collection="array" open="(" separator="," close=")">
|
|
<foreach item="levelId" collection="array" open="(" separator="," close=")">
|
|
|
#{levelId}
|
|
#{levelId}
|
|
|
</foreach>
|
|
</foreach>
|