package cn.iocoder.yudao.module.member.dal.mysql.groupcount;

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.member.dal.dataobject.groupcount.GroupCountDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.member.controller.admin.groupcount.vo.*;

/**
 * 用户分组充值统计 Mapper
 *
 * @author 秦俊旗
 */
@Mapper
public interface GroupCountMapper extends BaseMapperX<GroupCountDO> {

    default PageResult<GroupCountDO> selectPage(GroupCountPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<GroupCountDO>()
                .eqIfPresent(GroupCountDO::getGroupId, reqVO.getGroupId())
                .likeIfPresent(GroupCountDO::getGroupName, reqVO.getGroupName())
                .eqIfPresent(GroupCountDO::getMoney, reqVO.getMoney())
                .eqIfPresent(GroupCountDO::getMobile, reqVO.getMobile())
                .betweenIfPresent(GroupCountDO::getTime, reqVO.getTime())
                .betweenIfPresent(GroupCountDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(GroupCountDO::getId));
    }

}