You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
2.0 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.aurora.mapper;
// 导入定时任务数据传输对象(JobDTO),用于前台数据展示,通常包含更丰富的业务字段
import com.aurora.model.dto.JobDTO;
import com.aurora.entity.Job;// 导入与数据库表对应的实体类JobMapper接口操作的就是这个实体类对应的数据库表
import com.aurora.model.vo.JobSearchVO;// 导入定时任务搜索条件值对象(JobSearchVO),封装前端传递的搜索参数
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;// 导入Java集合框架中的List接口用于返回多个职位的集合
@Repository
// 定义JobMapper接口继承自MyBatis-Plus的BaseMapper接口
// 泛型参数Job指定了该Mapper操作的实体类型
// 继承BaseMapper后自动获得了数十个基本的CRUD增删改查方法
public interface JobMapper extends BaseMapper<Job> {
// 统计满足条件的定时任务数量(用于分页查询中的总数计算)
// @Param注解给参数起别名在XML中可以通过#{jobSearchVO.xxx}引用参数属性
// jobSearchVO: 封装搜索条件(如关键词、状态、时间范围等)
// 返回符合条件的定时任务操作总数Integer类型避免null值问题
Integer countJobs(@Param("jobSearchVO") JobSearchVO jobSearchVO);
// 分页获取定时任务操作列表(支持条件搜索)
// current: 当前页码从1开始size: 每页记录数
// jobSearchVO: 封装搜索条件对象,包含各种筛选参数
// 返回JobDTO列表包含定时任务操作信息和相关业务数据如定时操作任务名称、类型、统计信息等
List<JobDTO> listJobs(@Param("current") Long current, @Param("size") Long size, @Param("jobSearchVO")JobSearchVO jobSearchVO);
// 获取所有定时任务操作分组列表(用于分类筛选或下拉选择框)
// 返回字符串列表,每个字符串代表一个分组标识
List<String> listJobGroups();
}