package cn.newfeifan.mall.module.distri.dal.mysql.socialstatuschangecategory;

import java.util.*;

import cn.newfeifan.mall.framework.common.pojo.PageResult;
import cn.newfeifan.mall.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.newfeifan.mall.framework.mybatis.core.mapper.BaseMapperX;
import cn.newfeifan.mall.module.distri.dal.dataobject.socialstatuschangecategory.SocialStatusChangeCategoryDO;
import org.apache.ibatis.annotations.Mapper;
import cn.newfeifan.mall.module.distri.controller.admin.socialstatuschangecategory.vo.*;

/**
 * 会员身价变化类别 Mapper
 *
 * @author 非繁人
 */
@Mapper
public interface SocialStatusChangeCategoryMapper extends BaseMapperX<SocialStatusChangeCategoryDO> {

    default PageResult<SocialStatusChangeCategoryDO> selectPage(SocialStatusChangeCategoryPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<SocialStatusChangeCategoryDO>()
                .likeIfPresent(SocialStatusChangeCategoryDO::getName, reqVO.getName())
                .eqIfPresent(SocialStatusChangeCategoryDO::getCode, reqVO.getCode())
                .eqIfPresent(SocialStatusChangeCategoryDO::getVariationValue, reqVO.getVariationValue())
                .eqIfPresent(SocialStatusChangeCategoryDO::getDescription, reqVO.getDescription())
                .betweenIfPresent(SocialStatusChangeCategoryDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(SocialStatusChangeCategoryDO::getId));
    }

}