package com.yc.ship.module.resource.dal.mysql.shiptype;

import java.util.*;

import com.yc.ship.framework.common.pojo.PageResult;
import com.yc.ship.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.yc.ship.framework.mybatis.core.mapper.BaseMapperX;
import com.yc.ship.module.resource.dal.dataobject.shiptype.ResourceShipTypeDO;
import org.apache.ibatis.annotations.Mapper;
import com.yc.ship.module.resource.controller.admin.shiptype.vo.*;

/**
 * 资源管理-游轮类型管理 Mapper
 *
 * @author lfy
 */
@Mapper
public interface ResourceShipTypeMapper extends BaseMapperX<ResourceShipTypeDO> {

    default PageResult<ResourceShipTypeDO> selectPage(ResourceShipTypePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ResourceShipTypeDO>()
                .likeIfPresent(ResourceShipTypeDO::getName, reqVO.getName())
                .eqIfPresent(ResourceShipTypeDO::getCode, reqVO.getCode())
                .eqIfPresent(ResourceShipTypeDO::getStatus, reqVO.getStatus())
                .orderByDesc(ResourceShipTypeDO::getId));
    }

}