package com.yc.ship.module.ota.dal.mysql.otaDistributorRegion;

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.ota.dal.dataobject.otaDistributorRegion.OtaDistributorRegionDO;
import org.apache.ibatis.annotations.Mapper;
import com.yc.ship.module.ota.controller.admin.otaDistributorRegion.vo.*;

/**
 * 旅行社与代理区域关联 Mapper
 *
 * @author lsq
 */
@Mapper
public interface OtaDistributorRegionMapper extends BaseMapperX<OtaDistributorRegionDO> {

    default PageResult<OtaDistributorRegionDO> selectPage(OtaDistributorRegionPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OtaDistributorRegionDO>()
                .eqIfPresent(OtaDistributorRegionDO::getDistributorId, reqVO.getDistributorId())
                .eqIfPresent(OtaDistributorRegionDO::getDistributorRegionId, reqVO.getDistributorRegionId())
                .orderByDesc(OtaDistributorRegionDO::getId));
    }

}