潘志宝
2024-12-10 a440ec3bfaa1363f5841100b8948d852971a2eb1
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/dao/StScheduleModelDao.java
@@ -1,27 +1,25 @@
package com.iailab.module.model.mcs.sche.dao;
import com.baomidou.mybatisplus.core.metadata.IPage;
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.framework.tenant.core.db.dynamic.TenantDS;
import com.iailab.module.model.mcs.sche.entity.StScheduleModelEntity;
import com.iailab.module.model.mcs.sche.vo.StScheduleModelRespVO;
import com.iailab.module.model.mcs.sche.vo.StScheduleModelPageReqVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
/**
 * @author PanZhibao
 * @date 2021年07月19日 17:56
 */
@TenantDS
@Mapper
public interface StScheduleModelDao extends BaseMapperX<StScheduleModelEntity> {
    /**
     * 查询列表
     *
     * @param page
     * @param params
     * @return
     */
    IPage<StScheduleModelRespVO> getPageList(IPage<StScheduleModelEntity> page, @Param("params") Map<String, Object> params);
    default PageResult<StScheduleModelEntity> selectPage(StScheduleModelPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<StScheduleModelEntity>()
                .likeIfPresent(StScheduleModelEntity::getModelCode, reqVO.getModelCode())
                .likeIfPresent(StScheduleModelEntity::getModelName, reqVO.getModelName())
                .orderByDesc(StScheduleModelEntity::getCreateTime));
    }
}