You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.4 KiB

<?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.ccsens.experiment.persist.dao.SProjectDao">
<update id="updateStatusById">
UPDATE t_pro_task_detail
SET rec_status = 2
WHERE
id = #{projectId}
</update>
<select id="queryByCreator" resultType="com.ccsens.experiment.bean.vo.ProjectVo$SysProject">
SELECT
t.id,
t.`name`
FROM
t_pro_member m,
t_pro_role_member rm,
t_pro_role r,
t_label l,
t_pro_task_detail t
WHERE
m.id = rm.member_id
and r.id = rm.role_id
and r.label_id = l.id
and l.`level` = 5
and r.project_id = t.id
and m.user_id = #{userId}
and m.rec_status = 0
and rm.rec_status = 0
and r.rec_status = 0
and t.rec_status = 0
and l.rec_status = 0
</select>
<select id="selectById" resultType="com.ccsens.experiment.bean.vo.ProjectVo$SysProject">
SELECT
d.id,
d.`name`,
s.plan_start_time AS beginTime,
s.plan_end_time AS endTime
FROM
t_pro_task_detail AS d
LEFT JOIN t_pro_task_sub AS s ON d.id = s.task_detail_id
WHERE
d.rec_status = 0
AND s.rec_status = 0
AND d.id = #{projectId}
</select>
</mapper>