代码提交
This commit is contained in:
parent
39a31a9a29
commit
e0406ed5f4
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.springblade.system.mapper.ArchiveMapper">
|
<mapper namespace="org.springblade.system.mapper.ArchiveMapper">
|
||||||
<insert id="saveArchivalCatalogue">
|
<insert id="saveArchivalCatalogue">
|
||||||
INSERT INTO da_ky_files_contents
|
INSERT INTO record_da_ky_files_contents
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="contentName != null and contentName != ''">content_name,</if>
|
<if test="contentName != null and contentName != ''">content_name,</if>
|
||||||
<if test="parentId != null">parent_id,</if>
|
<if test="parentId != null">parent_id,</if>
|
||||||
|
|
@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<update id="editArchivalCatalogue">
|
<update id="editArchivalCatalogue">
|
||||||
UPDATE da_ky_files_contents
|
UPDATE record_da_ky_files_contents
|
||||||
<set>
|
<set>
|
||||||
<if test="contentName != null and contentName != ''">content_name = #{contentName},</if>
|
<if test="contentName != null and contentName != ''">content_name = #{contentName},</if>
|
||||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||||
|
|
@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
</update>
|
</update>
|
||||||
<delete id="delArchivalCatalogue">
|
<delete id="delArchivalCatalogue">
|
||||||
DELETE FROM da_ky_files_contents
|
DELETE FROM record_da_ky_files_contents
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
|
@ -82,8 +82,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
t1.update_user_name AS updateUserName,
|
t1.update_user_name AS updateUserName,
|
||||||
t1.del_flag AS delFlag
|
t1.del_flag AS delFlag
|
||||||
FROM
|
FROM
|
||||||
da_ky_files_contents t1
|
record_da_ky_files_contents t1
|
||||||
LEFT JOIN da_ky_files_contents t2 ON t1.parent_id = t2.id
|
LEFT JOIN record_da_ky_files_contents t2 ON t1.parent_id = t2.id
|
||||||
WHERE
|
WHERE
|
||||||
t1.del_flag = '1'
|
t1.del_flag = '1'
|
||||||
AND t1.LEVEL IN ( 0, 1, 2, 3 )
|
AND t1.LEVEL IN ( 0, 1, 2, 3 )
|
||||||
|
|
@ -114,9 +114,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
dkfc.update_user_id AS updateUserId,
|
dkfc.update_user_id AS updateUserId,
|
||||||
dkfc.update_user_name AS updateUserName
|
dkfc.update_user_name AS updateUserName
|
||||||
FROM
|
FROM
|
||||||
da_ky_files_contents dkfc
|
record_da_ky_files_contents dkfc
|
||||||
left join da_ky_files_contents dkfc1 on dkfc.parent_id = dkfc1.id
|
left join record_da_ky_files_contents dkfc1 on dkfc.parent_id = dkfc1.id
|
||||||
left join da_ky_files_contents dkfc2 on dkfc1.parent_id = dkfc2.id
|
left join record_da_ky_files_contents dkfc2 on dkfc1.parent_id = dkfc2.id
|
||||||
left join record_da_ky_files_classify_mark dkfcm on dkfcm.id = dkfc.classify_mark
|
left join record_da_ky_files_classify_mark dkfcm on dkfcm.id = dkfc.classify_mark
|
||||||
WHERE
|
WHERE
|
||||||
dkfc.del_flag = '1' and dkfc.parent_id = #{parentId} and dkfc.level = 4
|
dkfc.del_flag = '1' and dkfc.parent_id = #{parentId} and dkfc.level = 4
|
||||||
|
|
@ -145,8 +145,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
t1.update_user_id AS updateUserId,
|
t1.update_user_id AS updateUserId,
|
||||||
t1.update_user_name AS updateUserName
|
t1.update_user_name AS updateUserName
|
||||||
FROM
|
FROM
|
||||||
da_ky_files_contents t1
|
record_da_ky_files_contents t1
|
||||||
left join da_ky_files_contents t2 on t1.parent_id = t2.id
|
left join record_da_ky_files_contents t2 on t1.parent_id = t2.id
|
||||||
WHERE
|
WHERE
|
||||||
t1.id = #{id}
|
t1.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -154,8 +154,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
SELECT
|
SELECT
|
||||||
count(t1.id)
|
count(t1.id)
|
||||||
FROM
|
FROM
|
||||||
da_ky_files_contents t1
|
record_da_ky_files_contents t1
|
||||||
left join da_ky_files_contents t2 on t1.parent_id = t2.id
|
left join record_da_ky_files_contents t2 on t1.parent_id = t2.id
|
||||||
WHERE
|
WHERE
|
||||||
t2.id = #{id} and t1.del_flag = '1'
|
t2.id = #{id} and t1.del_flag = '1'
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -169,25 +169,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
del_flag = '1'
|
del_flag = '1'
|
||||||
</select>
|
</select>
|
||||||
<select id="geMaxSort" resultType="java.lang.Integer">
|
<select id="geMaxSort" resultType="java.lang.Integer">
|
||||||
select max(sort) from da_ky_files_contents where parent_id = #{parentId}
|
select max(sort) from record_da_ky_files_contents where parent_id = #{parentId}
|
||||||
</select>
|
</select>
|
||||||
<select id="getArchivalCatalogueByName" resultType="java.lang.Integer">
|
<select id="getArchivalCatalogueByName" resultType="java.lang.Integer">
|
||||||
select count(*) from da_ky_files_contents where content_name = #{contentName}
|
select count(*) from record_da_ky_files_contents where content_name = #{contentName}
|
||||||
and parent_id = #{parentId} and del_flag = '1'
|
and parent_id = #{parentId} and del_flag = '1'
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
and id != #{id}
|
and id != #{id}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="getSortById" resultType="java.lang.Integer">
|
<select id="getSortById" resultType="java.lang.Integer">
|
||||||
select sort from da_ky_files_contents where id = #{id}
|
select sort from record_da_ky_files_contents where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
<select id="getClassifyMark" resultType="java.lang.String">
|
<select id="getClassifyMark" resultType="java.lang.String">
|
||||||
select dkfcm.classify_mark_name from da_ky_files_contents dkfc
|
select dkfcm.classify_mark_name from record_da_ky_files_contents dkfc
|
||||||
left join record_da_ky_files_classify_mark dkfcm on dkfc.classify_mark = dkfcm.id
|
left join record_da_ky_files_classify_mark dkfcm on dkfc.classify_mark = dkfcm.id
|
||||||
where dkfc.id = #{id}
|
where dkfc.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
<select id="getLevelById" resultType="java.lang.Integer">
|
<select id="getLevelById" resultType="java.lang.Integer">
|
||||||
select `level` from da_ky_files_contents where id = #{id}
|
select `level` from record_da_ky_files_contents where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
SELECT
|
SELECT
|
||||||
COUNT(1)
|
COUNT(1)
|
||||||
FROM
|
FROM
|
||||||
da_ky_files_contents
|
record_da_ky_files_contents
|
||||||
WHERE
|
WHERE
|
||||||
del_flag = '1'
|
del_flag = '1'
|
||||||
AND
|
AND
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
id,
|
id,
|
||||||
content_name AS name
|
content_name AS name
|
||||||
FROM
|
FROM
|
||||||
da_ky_files_contents
|
record_da_ky_files_contents
|
||||||
WHERE
|
WHERE
|
||||||
del_flag = '1' and level = 1
|
del_flag = '1' and level = 1
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -137,7 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
update_user_id AS updateUserId,
|
update_user_id AS updateUserId,
|
||||||
update_user_name AS updateUserName,
|
update_user_name AS updateUserName,
|
||||||
del_flag AS delFlag
|
del_flag AS delFlag
|
||||||
FROM da_ky_files_contents
|
FROM record_da_ky_files_contents
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
|
|
@ -160,7 +160,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
t.update_user_id AS updateUserId,
|
t.update_user_id AS updateUserId,
|
||||||
t.update_user_name AS updateUserName,
|
t.update_user_name AS updateUserName,
|
||||||
t.del_flag AS delFlag
|
t.del_flag AS delFlag
|
||||||
FROM da_ky_files_contents t
|
FROM record_da_ky_files_contents t
|
||||||
INNER JOIN child_nodes c ON t.parent_id = c.id
|
INNER JOIN child_nodes c ON t.parent_id = c.id
|
||||||
WHERE t.del_flag = '1'
|
WHERE t.del_flag = '1'
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue