|
@@ -1,9 +1,9 @@
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.jeeplus.modules.projectAccessory.dao.ProjectTemplateDao">
|
|
|
-
|
|
|
+
|
|
|
<sql id="workReviewStandardColumns">
|
|
|
- a.id AS "id",
|
|
|
+ distinct (a.id) AS "id",
|
|
|
a.create_by AS "createBy.id",
|
|
|
a.create_date AS "createDate",
|
|
|
a.update_by AS "updateBy.id",
|
|
@@ -18,17 +18,17 @@
|
|
|
a.company_id AS "companyId",
|
|
|
a.index_num AS "indexNum"
|
|
|
</sql>
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
<select id="get" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo" >
|
|
|
- SELECT
|
|
|
+ SELECT
|
|
|
<include refid="workReviewStandardColumns"/>
|
|
|
FROM project_template_structure_info a
|
|
|
WHERE a.id = #{id}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="findList" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo" >
|
|
|
- SELECT
|
|
|
+ SELECT
|
|
|
<include refid="workReviewStandardColumns"/>
|
|
|
FROM project_template_structure_info a
|
|
|
<where>
|
|
@@ -103,14 +103,14 @@
|
|
|
where a.parent_id =#{parentId}
|
|
|
and a.id not in(select attach_id from project_accessory_relation_info where project_type = #{projectType} and attach_type = #{parentId} and id != #{id})
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="findAllList" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo" >
|
|
|
- SELECT
|
|
|
+ SELECT
|
|
|
<include refid="workReviewStandardColumns"/>
|
|
|
FROM project_template_structure_info a
|
|
|
<where>
|
|
|
a.del_flag = #{DEL_FLAG_NORMAL}
|
|
|
- </where>
|
|
|
+ </where>
|
|
|
<choose>
|
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
|
ORDER BY ${page.orderBy}
|
|
@@ -120,7 +120,7 @@
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<insert id="insert">
|
|
|
INSERT INTO project_template_structure_info(
|
|
|
id,
|
|
@@ -154,7 +154,7 @@
|
|
|
#{indexNum}
|
|
|
)
|
|
|
</insert>
|
|
|
-
|
|
|
+
|
|
|
<update id="update">
|
|
|
UPDATE project_template_structure_info SET
|
|
|
update_by = #{updateBy.id},
|
|
@@ -169,22 +169,22 @@
|
|
|
index_num = #{indexNum}
|
|
|
WHERE id = #{id}
|
|
|
</update>
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
<!--物理删除-->
|
|
|
<update id="delete">
|
|
|
DELETE FROM project_template_structure_info
|
|
|
WHERE id = #{id} OR find_in_set(#{id},parent_ids)
|
|
|
</update>
|
|
|
-
|
|
|
+
|
|
|
<!--逻辑删除-->
|
|
|
<update id="deleteByLogic">
|
|
|
UPDATE project_template_structure_info SET
|
|
|
del_flag = #{DEL_FLAG_DELETE}
|
|
|
WHERE id = #{id} OR find_in_set(#{id},parent_ids)
|
|
|
</update>
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
|
|
|
<select id="findUniqueByProperty" resultType="com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo" statementType="STATEMENT">
|
|
|
select * FROM project_template_structure_info where ${propertyName} = '${value}'
|
|
@@ -301,4 +301,4 @@
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
</select>
|
|
|
-</mapper>
|
|
|
+</mapper>
|