job
潘志宝
2024-08-26 cd5f8564e84694d098a4eeddecc36aa8ce7cfdf3
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
package com.iailab.module.data.job.dao;
 
import com.baomidou.dynamic.datasource.annotation.Master;
import com.iailab.framework.common.pojo.PageResult;
import com.iailab.framework.mybatis.core.mapper.BaseMapperX;
import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.iailab.module.data.job.entity.ScheduleJobEntity;
import com.iailab.module.data.job.vo.ScheduleJobReqVO;
import org.apache.ibatis.annotations.Mapper;
 
import java.util.Map;
 
/**
 * 定时任务
 *
 * @author Mark sunlightcs@gmail.com
 */
@Master
@Mapper
public interface ScheduleJobDao extends BaseMapperX<ScheduleJobEntity> {
 
    default PageResult<ScheduleJobEntity> selectPage(ScheduleJobReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ScheduleJobEntity>()
                .likeIfPresent(ScheduleJobEntity::getBeanName, reqVO.getBeanName())
                .eqIfPresent(ScheduleJobEntity::getTenantId, reqVO.getTenantId())
                .orderByDesc(ScheduleJobEntity::getCreateDate));
 
    }
    
    /**
     * 批量更新状态
     */
    int updateBatch(Map<String, Object> map);
}