package com.yonge.cooleshow.biz.dal.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yonge.cooleshow.biz.dal.dto.VipSubmitReq;
import com.yonge.cooleshow.biz.dal.dto.req.OrderReq;
import com.yonge.cooleshow.biz.dal.dto.search.VipRecordSearch;
import com.yonge.cooleshow.biz.dal.entity.ActivityReward;
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
import com.yonge.cooleshow.biz.dal.enums.SourceTypeEnum;
import com.yonge.cooleshow.biz.dal.vo.UserOrderDetailVo;
import com.yonge.cooleshow.biz.dal.vo.VipRecordVo;
import com.yonge.cooleshow.biz.dal.vo.res.OrderCreateRes;
import com.yonge.cooleshow.biz.dal.vo.UserOrderVo;
import com.yonge.cooleshow.biz.dal.vo.VipCardRecordVo;
import com.yonge.cooleshow.biz.dal.dto.search.VipCardRecordSearch;
import com.yonge.cooleshow.biz.dal.entity.VipCardRecord;
import com.yonge.cooleshow.common.entity.HttpResponseResult;
import com.yonge.toolset.base.page.PageInfo;

/**
 * 购买会员卡记录表 服务类
 *
 * @author liweifan
 * @date 2022-03-30
 */
public interface VipCardRecordService extends IService<VipCardRecord> {
    /**
     * 查询详情
     *
     * @author liweifan
     * @date 2022-03-30
     */
    VipCardRecordVo detail(Long orderDetilId);

    /**
     * 查询详情
     *
     * @author liweifan
     * @date 2022-03-30
     */
    VipCardRecordVo detail(Long orderDetilId, Long userId);

    /**
     * 构建VipCardRecord对象
     * @param orderDetailVo
     * @return
     */
    VipCardRecord buildVipCardRecordByOrderDetail(UserOrderDetailVo orderDetailVo);

    /**
     * 活动构建vip card record 对象
     *
     * @param userId 用户id
     * @param client 客户端类型
     * @param activityReward 活动奖品
     * @param activityId 活动id
     * @return
     */
    VipCardRecord buildVipCardRecordByOrderDetail(Long userId, ClientEnum client, ActivityReward activityReward, Long activityId,String activityName);

    VipCardRecord getVipCardRecord(Long userId, ClientEnum client, String orderNo, String subOrderNo, String periodType, Long memberPriceSettingsId, Integer timeNum, SourceTypeEnum sourceType, Long createBy, String reason);

    /**
     * 分页查询
     *
     * @author liweifan
     * @date 2022-03-30
     */
    IPage<VipCardRecordVo> selectPage(IPage<VipCardRecordVo> page, VipCardRecordSearch query);

    /***
     * 会员卡到期提醒
     * @author liweifan
     * @updateTime 2022/5/5 19:28
     */
    void pollExpireMsg();

    /**
     * 会员添加记录
     *
     * @param recordSearch
     * @return
     */
    PageInfo<VipRecordVo> vipRecord(VipRecordSearch recordSearch);
}