zcloud-gbs-eightwork/web-infrastructure/src/main/resources/mapper/TaskLogMapper.xml

38 lines
1.2 KiB
XML
Raw Normal View History

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
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
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>
<select id="getByWorkIdAndStepId" resultType="com.zcloud.eightwork.persistence.dataobject.TaskLogDO">
select *
from task_log
where work_id = #{workId}
and step_id = #{stepId}
limit 1
</select>
2026-03-10 08:29:37 +08:00
</mapper>