package com.hzs.member.detail.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzs.common.domain.member.detail.CuMemberLevel;
import com.hzs.common.domain.member.detail.ext.CuMemberLevelExt;
import com.hzs.member.detail.param.CuMemberLevelParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 会员信息-等级升级记录 Mapper 接口
 */
public interface CuMemberLevelMapper extends BaseMapper<CuMemberLevel> {

    /**
     * 查询会员升级列表
     *
     * @param param
     * @return
     */
    List<CuMemberLevelExt> listMemberLevelList(@Param("param") CuMemberLevelParam param);

    /**
     * 查询手动 + 自动升级的最新一条
     *
     * @param pkMember 会员ID
     * @return
     */
    CuMemberLevel queryLastManualUpgrade(@Param("pkMember") Long pkMember);

}
