1、增加退回任务通知接口,并完善
This commit is contained in:
@@ -130,4 +130,6 @@ public interface TaskMapper {
|
||||
String queryEventTypeAct(String eventType);
|
||||
|
||||
List<Task> queryAuditInfoNotification(String userId , Integer auditStatus);
|
||||
|
||||
void updateNotificationByTaskId(@Param("taskIds") List<Long> taskIdList);
|
||||
}
|
||||
|
||||
@@ -622,7 +622,16 @@ public class TaskService {
|
||||
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public List<Task> auditInfoNotification(String userId) {
|
||||
return taskMapper.queryAuditInfoNotification(userId,AuditStatusEnum.RETURNED.getNum());
|
||||
List<Task> tasksNotification = taskMapper.queryAuditInfoNotification(userId,AuditStatusEnum.RETURNED.getNum());
|
||||
if (tasksNotification.isEmpty()){
|
||||
return tasksNotification;
|
||||
}
|
||||
List<Long> taskIdList = tasksNotification.stream().map(Task::getTaskId).toList();
|
||||
taskMapper.updateNotificationByTaskId(taskIdList);
|
||||
|
||||
return tasksNotification;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,14 @@
|
||||
</foreach>
|
||||
AND expire_time IS NULL
|
||||
</update>
|
||||
<update id="updateNotificationByTaskId">
|
||||
UPDATE t_task
|
||||
SET is_need_notification = 0
|
||||
WHERE task_id IN
|
||||
<foreach collection="taskIds" item="taskId" open="(" separator="," close=")">
|
||||
#{taskId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<delete id="deleteTask">
|
||||
DELETE
|
||||
|
||||
Reference in New Issue
Block a user