package cn.iocoder.yudao.module.pms.dal.mysql.iotopeationmodel;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.pms.controller.admin.vo.IotOpeationModelPageReqVO;
import cn.iocoder.yudao.module.pms.dal.dataobject.iotopeationmodel.IotOpeationModelDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 运行记录模板主 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface IotOpeationModelMapper extends BaseMapperX<IotOpeationModelDO> {

    default PageResult<IotOpeationModelDO> selectPage(IotOpeationModelPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<IotOpeationModelDO>()
                .eqIfPresent(IotOpeationModelDO::getDeptId, reqVO.getDeptId())
                .likeIfPresent(IotOpeationModelDO::getOrgName, reqVO.getOrgName())
                .eqIfPresent(IotOpeationModelDO::getDeviceType, reqVO.getDeviceType())
                .eqIfPresent(IotOpeationModelDO::getDeviceComponent, reqVO.getDeviceComponent())
                .eqIfPresent(IotOpeationModelDO::getFillInfo, reqVO.getFillInfo())
                .likeIfPresent(IotOpeationModelDO::getCreName, reqVO.getCreName())
                .betweenIfPresent(IotOpeationModelDO::getCreDate, reqVO.getCreDate())
                .orderByDesc(IotOpeationModelDO::getId));
    }

    IotOpeationModelDO getNew();

    int insertCom(IotOpeationModelDO modelDO);

    int updateCom(IotOpeationModelDO modelDO);

    int insertFillInfo(IotOpeationModelDO modelDO);

    int updateFillInfo(IotOpeationModelDO modelDO);

}