serv-学习
This commit is contained in:
@@ -94,6 +94,16 @@
|
||||
ORDER BY ttu.create_time ASC
|
||||
</select>
|
||||
|
||||
<select id="selectUserTaskItem" resultMap="TaskItemResultMap">
|
||||
SELECT
|
||||
ttu.*,
|
||||
tu.username
|
||||
FROM tb_task_user ttu
|
||||
INNER JOIN tb_sys_user tu ON ttu.user_id = tu.id
|
||||
WHERE ttu.task_id = #{taskId} and ttu.user_id = #{userId} and ttu.deleted = 0 and tu.deleted = 0
|
||||
ORDER BY ttu.create_time ASC
|
||||
</select>
|
||||
|
||||
<!-- 根据用户ID查询任务关联列表 -->
|
||||
<select id="selectByUserId" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
@@ -142,14 +152,33 @@
|
||||
<!-- 插入任务用户关联 -->
|
||||
<insert id="insertTaskUser" parameterType="org.xyzh.common.dto.study.TbTaskUser">
|
||||
INSERT INTO tb_task_user (
|
||||
id, task_id, user_id, dept_id, status, progress, complete_time,
|
||||
creator, create_time
|
||||
id, task_id, user_id, dept_id,creator, create_time
|
||||
) VALUES (
|
||||
#{id}, #{taskID}, #{userID}, #{deptID}, #{status}, #{progress}, #{completeTime},
|
||||
#{creator}, #{createTime}
|
||||
#{id}, #{taskID}, #{userID}, #{deptID}, #{creator}, #{createTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 更新任务用户关联 -->
|
||||
<update id="updateTaskUser" parameterType="org.xyzh.common.dto.study.TbTaskUser">
|
||||
UPDATE tb_task_user
|
||||
<set>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
<if test="progress != null">
|
||||
progress = #{progress},
|
||||
</if>
|
||||
<if test="completeTime != null">
|
||||
complete_time = #{completeTime},
|
||||
</if>
|
||||
<if test="updater != null">
|
||||
updater = #{updater},
|
||||
</if>
|
||||
update_time = NOW()
|
||||
</set>
|
||||
WHERE task_id = #{taskID} AND user_id = #{userID} AND deleted = 0
|
||||
</update>
|
||||
|
||||
<!-- 删除任务用户关联 -->
|
||||
<delete id="deleteTaskUser" parameterType="org.xyzh.common.dto.study.TbTaskUser">
|
||||
DELETE FROM tb_task_user
|
||||
|
||||
Reference in New Issue
Block a user