package com.jsowell.system.mapper; import com.jsowell.system.domain.SysTodoTask; import com.jsowell.system.domain.dto.TodoTaskQuery; import org.apache.ibatis.annotations.Param; import java.util.List; /** * 待办任务数据层。 * * @author jsowell */ public interface SysTodoTaskMapper { SysTodoTask selectTodoById(@Param("todoId") Long todoId); SysTodoTask selectTodoByIdForAssignee(@Param("todoId") Long todoId, @Param("assigneeUserId") Long assigneeUserId); SysTodoTask selectActiveByIdempotentKey(@Param("activeIdempotentKey") String activeIdempotentKey); List selectTodoList(TodoTaskQuery query); List selectHomeList(@Param("assigneeUserId") Long assigneeUserId, @Param("limit") int limit); int countActive(@Param("assigneeUserId") Long assigneeUserId); int countUnread(@Param("assigneeUserId") Long assigneeUserId); int insertTodoTask(SysTodoTask todoTask); int markTodoRead(@Param("todoId") Long todoId, @Param("assigneeUserId") Long assigneeUserId, @Param("updateBy") String updateBy); int markAllRead(@Param("assigneeUserId") Long assigneeUserId, @Param("updateBy") String updateBy); int completeTodoForAssignee(@Param("todoId") Long todoId, @Param("assigneeUserId") Long assigneeUserId, @Param("completedBy") Long completedBy, @Param("updateBy") String updateBy); int completeTodoByBusiness(@Param("businessType") String businessType, @Param("businessId") String businessId, @Param("assigneeUserId") Long assigneeUserId, @Param("completedBy") Long completedBy, @Param("updateBy") String updateBy); int cancelTodoForAssignee(@Param("todoId") Long todoId, @Param("assigneeUserId") Long assigneeUserId, @Param("reason") String reason, @Param("updateBy") String updateBy); int cancelTodo(@Param("todoId") Long todoId, @Param("reason") String reason, @Param("updateBy") String updateBy); int cancelTodoByBusiness(@Param("businessType") String businessType, @Param("businessId") String businessId, @Param("assigneeUserId") Long assigneeUserId, @Param("reason") String reason, @Param("updateBy") String updateBy); }