package com.zt.plat.module.base.dal.dao.untInfo;

import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import com.zt.plat.module.base.dal.dataobject.untInfo.UntInfoDO;
import org.apache.ibatis.annotations.Mapper;
import com.zt.plat.module.base.controller.admin.untInfo.vo.*;

/**
 * 计量单位 Mapper
 *
 * @author 后台管理-1
 */
@Mapper
public interface UntInfoMapper extends BaseMapperX<UntInfoDO> {

    default PageResult<UntInfoDO> selectPage(UntInfoPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<UntInfoDO>()
                .likeIfPresent(UntInfoDO::getName, reqVO.getName())
                .eqIfPresent(UntInfoDO::getSmb, reqVO.getSmb())
                .betweenIfPresent(UntInfoDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(UntInfoDO::getId));
    }

}