陈昶聿
8 天以前 655d01040d8c658091e978851961464b91be3506
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package com.smartor.mapper;
 
import com.smartor.domain.ServiceTaskSchedule;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
 
/**
 * 随访任务计划主表 Mapper 接口
 *
 * @author smartor
 * @date 2026-06-30
 */
@Mapper
public interface ServiceTaskScheduleMapper {
 
    /**
     * 查询计划详情
     */
    ServiceTaskSchedule selectServiceTaskScheduleById(Long id);
 
    /**
     * 通过 taskid 查询任务对应的有效计划(appltype=5 一对一)
     */
    ServiceTaskSchedule selectByTaskid(@Param("taskid") Long taskid);
 
    /**
     * 查询计划列表
     */
    List<ServiceTaskSchedule> selectServiceTaskScheduleList(ServiceTaskSchedule serviceTaskSchedule);
 
    /**
     * 新增计划
     */
    int insertServiceTaskSchedule(ServiceTaskSchedule serviceTaskSchedule);
 
    /**
     * 修改计划
     */
    int updateServiceTaskSchedule(ServiceTaskSchedule serviceTaskSchedule);
 
    /**
     * 逻辑删除(按 id)
     */
    int deleteServiceTaskScheduleById(Long id);
 
    /**
     * 逻辑删除(按 taskid):修改任务时清空旧计划
     */
    int deleteByTaskid(@Param("taskid") Long taskid);
 
    /**
     * 任务组(appltype=5)滚动调度用:查询所有未达上限的循环计划。
     * 条件:schedule_style=1 且 (max_loop_count is null or max_loop_count=0 or current_loop_count &lt; max_loop_count)
     * 限制返回条数避免长事务。
     */
    List<ServiceTaskSchedule> selectActiveCycleSchedules(@Param("limit") int limit);
}