package com.tashow.cloud.ai.dal.mysql.aisample;

import com.tashow.cloud.ai.controller.admin.aisample.vo.AiSampleTagGroupPageReqVO;
import com.tashow.cloud.ai.dal.dataobject.aisample.AiSampleTagGroupDO;
import com.tashow.cloud.common.pojo.PageResult;
import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX;
import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX;
import org.apache.ibatis.annotations.Mapper;

/**
 * 样本标签分组库 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface AiSampleTagGroupMapper extends BaseMapperX<AiSampleTagGroupDO> {

    default PageResult<AiSampleTagGroupDO> selectPage(AiSampleTagGroupPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<AiSampleTagGroupDO>()
                .likeIfPresent(AiSampleTagGroupDO::getGroupName, reqVO.getGroupName())
                .betweenIfPresent(AiSampleTagGroupDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(AiSampleTagGroupDO::getId));
    }

}