2026-03-10 08:29:37 +08:00
|
|
|
<?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.zcloud.eightwork.persistence.mapper.TaskLogMapper">
|
|
|
|
|
|
|
|
|
|
<select id="getTodoCount" resultType="com.zcloud.eightwork.domain.model.TodoCountE">
|
|
|
|
|
select work_type,
|
|
|
|
|
count(1) as todoCount
|
2026-03-18 11:25:55 +08:00
|
|
|
from task_log
|
2026-03-10 08:29:37 +08:00
|
|
|
where status = 0
|
|
|
|
|
and (act_user = #{userId}
|
|
|
|
|
or (act_user_department = #{orgId} and act_user is null))
|
|
|
|
|
group by work_type
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getTodoCountForWork" resultType="com.zcloud.eightwork.domain.model.TodoCountE">
|
|
|
|
|
select work_type,
|
|
|
|
|
step_id,
|
|
|
|
|
count(1) as todoCount
|
2026-03-18 11:25:55 +08:00
|
|
|
from task_log
|
2026-03-10 08:29:37 +08:00
|
|
|
where status = 0
|
|
|
|
|
and work_type = #{workType}
|
|
|
|
|
and (act_user = #{userId}
|
|
|
|
|
or (act_user_department = #{orgId} and act_user is null))
|
|
|
|
|
group by step_id
|
|
|
|
|
</select>
|
2026-03-13 08:29:06 +08:00
|
|
|
|
|
|
|
|
<select id="getByWorkIdAndStepId" resultType="com.zcloud.eightwork.persistence.dataobject.TaskLogDO">
|
|
|
|
|
select *
|
2026-03-18 11:25:55 +08:00
|
|
|
from task_log
|
2026-03-13 08:29:06 +08:00
|
|
|
where work_id = #{workId}
|
|
|
|
|
and step_id = #{stepId}
|
|
|
|
|
limit 1
|
|
|
|
|
</select>
|
2026-03-10 08:29:37 +08:00
|
|
|
</mapper>
|
|
|
|
|
|