package com.hzs.member.base.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzs.common.domain.member.achieve.CuMemberRetailDetail;
import com.hzs.member.base.param.CuMemberPointPairParam;
import com.hzs.member.structure.controller.dto.CuMemberPointDTO;
import com.hzs.member.structure.controller.vo.ChildCodeVO;
import com.hzs.member.structure.controller.vo.CuMemberPointDetailVO;
import com.hzs.member.structure.controller.vo.CuMemberThreeFrameworkVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface CuMemberRetailDetailMapper extends BaseMapper<CuMemberRetailDetail> {
    List<ChildCodeVO> getChildList(@Param("memberCode") String memberCode,
                                   @Param("stage")Integer stage,
                                   @Param("stageStatus")Integer stageStatus,
                                   @Param("settleTableName")String settleTableName);

    Integer getFindCumemberRetailDetail(@Param("settleTableName") String settleTableName);

    CuMemberRetailDetail getCuMemberRetailDetailByUserId(@Param("userId")Long userId,
                                                         @Param("stage")Integer stage,
                                                         @Param("stageStatus")Integer stageStatus,
                                                         @Param("childNode")String childNode,
                                                         @Param("settleTableName")String settleTableName);

    List<ChildCodeVO> getChildListByUserId(@Param("userId") Long userId,
                                           @Param("stage")Integer stage,
                                           @Param("stageStatus")Integer stageStatus,
                                           @Param("settleTableName")String settleTableName);


    List<CuMemberThreeFrameworkVO> getCuMemberRetailDetailDTOList(@Param("settleTableName") String settleTableName,
                                                                   @Param("memberCode") String memberCode,
                                                                   @Param("stage") Integer stage,
                                                                   @Param("stageStatus") Integer stageStatus);


    CuMemberPointDTO getPointDetailByUserId(@Param("userId") Long userId,
                                            @Param("stage") Integer stage,
                                            @Param("point") Integer point,
                                            @Param("settleTableName") String settleTableName);

    List<CuMemberPointDTO> getPointDetailListByPoints(@Param("pairList") List<CuMemberPointPairParam> pairList,
                                                           @Param("stage") Integer stage,
                                                           @Param("settleTableName") String settleTableName);

}
