package com.hzs.activity.draw.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hzs.activity.draw.param.AcDrawRewardNumParam;
import com.hzs.common.domain.activity.draw.AcDrawRewardNum;
import com.hzs.common.domain.activity.draw.ext.AcDrawRewardNumExt;
import com.hzs.common.domain.member.account.CuMemberAccount;
import com.hzs.common.domain.member.ext.CuMemberAccountExt;
import com.hzs.common.domain.sale.ext.SaOrderExt;

import java.util.List;

/**
 * 会员可抽奖次数记录 服务类
 */
public interface IAcDrawRewardNumService extends IService<AcDrawRewardNum> {

    /*
     *  查询会员抽奖活动,查询会员的抽奖次数
     **/
    AcDrawRewardNum queryAcDrawRewardNum(AcDrawRewardNumParam acDrawRewardNumParam);

    /*
     *  会员后台查询抽奖次数
     **/
    List<AcDrawRewardNumExt> queryDrawRewardExtNumByCondition(AcDrawRewardNumParam acDrawRewardNumParam);

    /*
     *  更新会员抽奖次数
     **/
    Boolean updateAcDrawRewardNum(AcDrawRewardNum acDrawRewardNum);

    /**
     * 查询会员账户状态，账户信息
     *
     * @param cuMemberAccount 会员账户条件信息
     */
    List<CuMemberAccountExt> queryMemberAccountByCondition(CuMemberAccount cuMemberAccount);

    /*
     *  查询
     **/
    AcDrawRewardNumExt queryDrawRewardNumByCondition(AcDrawRewardNumParam acDrawRewardNumParam);

    /*
     *  支付抽奖次数
     **/
    void payDrawRewardNum(CuMemberAccountExt cuMemberAccountExt, Integer payNum, AcDrawRewardNumExt acDrawRewardNumExt);

    /*
     *  在线支付确认生成待支付订单
     **/
    String confirmDrawRewardPayNum(AcDrawRewardNumParam acDrawRewardNumParam, AcDrawRewardNumExt acDrawRewardNum);

    /*
     *  赠送抽奖次数
     **/
    Boolean giveMemberDrawNum(SaOrderExt saOrderExt);

    /*
     *  撤单时回退抽奖次数
     **/
    Boolean backGiveMemberDrawNum(SaOrderExt saOrderExt);

}
