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

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.controller.admin.newhosts.vo.NewHostsPageReqVO;
import cn.iocoder.yudao.module.tkdata.dal.dataobject.employeehosts.EmployeeHostsDO;
import cn.iocoder.yudao.module.tkdata.dal.dataobject.newhosts.NewHostsDO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.tkdata.controller.admin.employeehosts.vo.*;
import org.apache.ibatis.annotations.Param;

/**
 * 员工分配主播表，结构和主播表相同，多了user_id 字段来区分所属员工 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface EmployeeHostsMapper extends BaseMapperX<EmployeeHostsDO> {

//    default PageResult<EmployeeHostsDO> selectPage(EmployeeHostsPageReqVO reqVO) {
//        return selectPage(reqVO, new LambdaQueryWrapperX<EmployeeHostsDO>()
//                .likeIfPresent(EmployeeHostsDO::getHostsId, reqVO.getHostsId())
//                .eqIfPresent(EmployeeHostsDO::getUserId, reqVO.getUserId())
//                .eqIfPresent(EmployeeHostsDO::getHostsLevel, reqVO.getHostsLevel())
//                .betweenIfPresent(EmployeeHostsDO::getHostsCoins, reqVO.getHostsCoins())
//                .eqIfPresent(EmployeeHostsDO::getInvitationType, reqVO.getInvitationType())
//                .betweenIfPresent(EmployeeHostsDO::getOnlineFans, reqVO.getOnlineFans())
//                .betweenIfPresent(EmployeeHostsDO::getFans, reqVO.getFans())
//                .betweenIfPresent(EmployeeHostsDO::getFllowernum, reqVO.getFllowernum())
//                .betweenIfPresent(EmployeeHostsDO::getYesterdayCoins, reqVO.getYesterdayCoins())
//                .eqIfPresent(EmployeeHostsDO::getCountry, reqVO.getCountry())
//                .likeIfPresent(EmployeeHostsDO::getHostsKind, reqVO.getHostsKind())
//                .eqIfPresent(EmployeeHostsDO::getOperationStatus, reqVO.getOperationStatus())
//                .betweenIfPresent(EmployeeHostsDO::getCreateTime, reqVO.getCreateTime())
//                .orderByDesc(EmployeeHostsDO::getId));
//    }

//    default PageResult<EmployeeHostsDO> selectPageWithSelf(EmployeeHostsPageReqVO reqVO) {
//        return selectPage(reqVO, new LambdaQueryWrapperX<EmployeeHostsDO>()
//                .likeIfPresent(EmployeeHostsDO::getHostsId, reqVO.getHostsId())
//                .eqIfPresent(EmployeeHostsDO::getUserId, reqVO.getUserId())
//                .eqIfPresent(EmployeeHostsDO::getHostsLevel, reqVO.getHostsLevel())
//                .betweenIfPresent(EmployeeHostsDO::getHostsCoins, reqVO.getHostsCoins())
//                .eqIfPresent(EmployeeHostsDO::getInvitationType, reqVO.getInvitationType())
//                .betweenIfPresent(EmployeeHostsDO::getOnlineFans, reqVO.getOnlineFans())
//                .betweenIfPresent(EmployeeHostsDO::getFans, reqVO.getFans())
//                .betweenIfPresent(EmployeeHostsDO::getFllowernum, reqVO.getFllowernum())
//                .betweenIfPresent(EmployeeHostsDO::getYesterdayCoins, reqVO.getYesterdayCoins())
//                .eqIfPresent(EmployeeHostsDO::getCountry, reqVO.getCountry())
//                .likeIfPresent(EmployeeHostsDO::getHostsKind, reqVO.getHostsKind())
//                .eqIfPresent(EmployeeHostsDO::getOperationStatus, reqVO.getOperationStatus())
//                .betweenIfPresent(EmployeeHostsDO::getCreateTime, reqVO.getCreateTime())
//                .eq(EmployeeHostsDO::getUserId, reqVO.getUserId())
//                .orderByDesc(EmployeeHostsDO::getId));
//    }



    int insertIgnore(EmployeeHostsDO bean);

    int batchInsertIgnore(List<EmployeeHostsDO> list);

    IPage<EmployeeHostsDO> selectPageWithXMLWithSelf(IPage<EmployeeHostsDO> page, @Param("req") EmployeeHostsPageReqVO reqVO);

    IPage<EmployeeHostsDO> selectPageWithXML(IPage<EmployeeHostsDO> page, @Param("req") EmployeeHostsPageReqVO reqVO);
}