package com.trs.digital.module.manager.dal.mysql.errorwold;

import java.util.*;

import com.trs.digital.framework.common.pojo.PageResult;
import com.trs.digital.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.trs.digital.framework.mybatis.core.mapper.BaseMapperX;
import com.trs.digital.module.manager.dal.dataobject.errorwold.ErrorwoldDO;
import org.apache.ibatis.annotations.Mapper;
import com.trs.digital.module.manager.controller.admin.errorwold.vo.*;

/**
 * 搜索词纠错 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface ErrorwoldMapper extends BaseMapperX<ErrorwoldDO> {

    default PageResult<ErrorwoldDO> selectPage(ErrorwoldPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ErrorwoldDO>()
                .eqIfPresent(ErrorwoldDO::getErrorWord, reqVO.getErrorWord())
                .eqIfPresent(ErrorwoldDO::getTrueWord, reqVO.getTrueWord())
                .eqIfPresent(ErrorwoldDO::getId, reqVO.getId())
                .betweenIfPresent(ErrorwoldDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ErrorwoldDO::getId));
    }

}