package cn.iocoder.byzs.module.bjdx.dal.mysql.courselabel;

import cn.iocoder.byzs.module.bjdx.controller.admin.courselabel.vo.CourseLabelPageReqVO;
import cn.iocoder.byzs.framework.common.pojo.PageResult;
import cn.iocoder.byzs.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.byzs.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.byzs.module.bjdx.dal.dataobject.courselabel.CourseLabelDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.byzs.module.bjdx.controller.admin.courselabel.vo.*;

/**
 * 课程-标签 Mapper
 *
 * @author lyb
 */
@Mapper
public interface CourseLabelMapper extends BaseMapperX<CourseLabelDO> {

    default PageResult<CourseLabelDO> selectPage(CourseLabelPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CourseLabelDO>()
                .eqIfPresent(CourseLabelDO::getClCourseId, reqVO.getClCourseId())
                .eqIfPresent(CourseLabelDO::getClCourseLabelId, reqVO.getClCourseLabelId())
                .orderByDesc(CourseLabelDO::getId));
    }

}