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 < max_loop_count)
|
* 限制返回条数避免长事务。
|
*/
|
List<ServiceTaskSchedule> selectActiveCycleSchedules(@Param("limit") int limit);
|
}
|