package cn.iocoder.yudao.module.tkdata.dal.mysql.customserviceinfo;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.tkdata.dal.dataobject.customserviceinfo.CustomServiceInfoDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.tkdata.controller.admin.customserviceinfo.vo.*;

/**
 * 客服信息 Mapper
 *
 * @author ziin
 */
@Mapper
public interface CustomServiceInfoMapper extends BaseMapperX<CustomServiceInfoDO> {

    default PageResult<CustomServiceInfoDO> selectPage(CustomServiceInfoPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CustomServiceInfoDO>()
                .likeIfPresent(CustomServiceInfoDO::getName, reqVO.getName())
                .eqIfPresent(CustomServiceInfoDO::getAvater, reqVO.getAvater())
                .eqIfPresent(CustomServiceInfoDO::getDescription, reqVO.getDescription())
                .eqIfPresent(CustomServiceInfoDO::getConcat, reqVO.getConcat())
                .eqIfPresent(CustomServiceInfoDO::getPhone, reqVO.getPhone())
                .betweenIfPresent(CustomServiceInfoDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(CustomServiceInfoDO::getId));
    }

}