|
@@ -9,6 +9,7 @@
|
|
|
<result property="title" column="title"/>
|
|
<result property="title" column="title"/>
|
|
|
<result property="source" column="source"/>
|
|
<result property="source" column="source"/>
|
|
|
<result property="image" column="image"/>
|
|
<result property="image" column="image"/>
|
|
|
|
|
+ <result property="imageId" column="image_id"/>
|
|
|
<result property="content" column="content"/>
|
|
<result property="content" column="content"/>
|
|
|
<result property="phase" column="phase"/>
|
|
<result property="phase" column="phase"/>
|
|
|
<result property="intervalMinDay" column="interval_min_day"/>
|
|
<result property="intervalMinDay" column="interval_min_day"/>
|
|
@@ -25,8 +26,7 @@
|
|
|
<result property="squareDocId" column="square_doc_id"/>
|
|
<result property="squareDocId" column="square_doc_id"/>
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
<sql id="baseColumn">
|
|
<sql id="baseColumn">
|
|
|
- id
|
|
|
|
|
- , type, title, source, image, content, phase, interval_min_day, interval_max_day, tenant_id, create_time, create_by, update_time, update_by, version, md5, content_md5, deleted, square_doc_id
|
|
|
|
|
|
|
+ id, type, title, source, image,image_id, content, phase, interval_min_day, interval_max_day, tenant_id, create_time, create_by, update_time, update_by, version, md5, content_md5, deleted, square_doc_id
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectBizMissionDocById" resultMap="MissionDoc">
|
|
<select id="selectBizMissionDocById" resultMap="MissionDoc">
|
|
@@ -61,6 +61,9 @@
|
|
|
<if test="image != null">
|
|
<if test="image != null">
|
|
|
image = #{image ,jdbcType=VARCHAR},
|
|
image = #{image ,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="imageId != null">
|
|
|
|
|
+ image_id = #{imageId ,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
<if test="content != null">
|
|
<if test="content != null">
|
|
|
content = #{content ,jdbcType=VARCHAR},
|
|
content = #{content ,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
@@ -68,10 +71,10 @@
|
|
|
phase = #{phase ,jdbcType=VARCHAR},
|
|
phase = #{phase ,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
<if test="intervalMinDay != null">
|
|
<if test="intervalMinDay != null">
|
|
|
- interval_min_day = #{intervalMinDay ,jdbcType=VARCHAR},
|
|
|
|
|
|
|
+ interval_min_day = #{intervalMinDay ,jdbcType=BIGINT},
|
|
|
</if>
|
|
</if>
|
|
|
<if test="intervalMaxDay != null">
|
|
<if test="intervalMaxDay != null">
|
|
|
- interval_max_day = #{intervalMaxDay ,jdbcType=VARCHAR},
|
|
|
|
|
|
|
+ interval_max_day = #{intervalMaxDay ,jdbcType=BIGINT},
|
|
|
</if>
|
|
</if>
|
|
|
<if test="tenantId != null">
|
|
<if test="tenantId != null">
|
|
|
tenant_id = #{tenantId ,jdbcType=VARCHAR},
|
|
tenant_id = #{tenantId ,jdbcType=VARCHAR},
|
|
@@ -100,4 +103,39 @@
|
|
|
</set>
|
|
</set>
|
|
|
where id = #{id ,jdbcType=VARCHAR}
|
|
where id = #{id ,jdbcType=VARCHAR}
|
|
|
</update>
|
|
</update>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectBizDeptAndDocByDeptIdList" resultType="cn.tr.module.smart.wx.controller.vo.BizDeptAndDocVO">
|
|
|
|
|
+ select bdd.dept_id as deptId,
|
|
|
|
|
+ bd.name as deptName,
|
|
|
|
|
+ bmd.id as docId,
|
|
|
|
|
+ bmd.type as type,
|
|
|
|
|
+ bmd.title as title,
|
|
|
|
|
+ bmd.source as source,
|
|
|
|
|
+ bmd.image as image,
|
|
|
|
|
+ bmd.image_id as imageId,
|
|
|
|
|
+ bmd.phase as phase,
|
|
|
|
|
+ bmd.interval_min_day as intervalMinDay,
|
|
|
|
|
+ bmd.interval_max_day as intervalMaxDay,
|
|
|
|
|
+ bmd.create_time as createTime
|
|
|
|
|
+ from biz_doc_dept bdd
|
|
|
|
|
+ join biz_mission_doc bmd on
|
|
|
|
|
+ bdd.doc_id = bmd.id
|
|
|
|
|
+ join biz_dept bd on
|
|
|
|
|
+ bd.id = bdd.dept_id
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="query.deptId != null and query.deptId != ''">
|
|
|
|
|
+ and bdd.dept_id = #{query.deptId ,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="query.time != null">
|
|
|
|
|
+ and #{query.time} BETWEEN bmd.interval_min_day AND bmd.interval_max_day
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="query.phase != null and query.phase != ''">
|
|
|
|
|
+ and bmd.phase = #{query.phase,jdbcType=VARCHAR}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="query.title != null and query.title != ''">
|
|
|
|
|
+ and bmd.title like concat('%',#{query.title,jdbcType=VARCHAR},'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
</mapper>
|
|
</mapper>
|