package com.cyksj.service.register;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cyksj.dto.Result;
import com.cyksj.model.dto.AliPayParams;
import com.cyksj.model.dto.H5JsPayParams;
import com.cyksj.model.entity.RegisterOrderDon;
import com.cyksj.model.entity.SpotifyUnLimitRecord;
import com.cyksj.model.manage.request.RegisterReq;
import com.cyksj.model.request.AlipayOrderDonReq;
import com.cyksj.model.request.OrderRefundReq;
import com.cyksj.model.views.CouponUserView;

import java.util.Map;

/**
 * @author chan
 * @date 2022/11/7 2:39 PM
 */
public interface RegisterOrderDonService extends IService<RegisterOrderDon> {

    boolean isFree(long userId, String platform, String code);

    RegisterOrderDon saveOrder(long userId, RegisterReq req, boolean isFree) throws Exception;

    H5JsPayParams pay(Long orderId) throws Exception;

    void prepayNotify(Map<String, String> map) throws Exception;

    Result<String> wxRefund(OrderRefundReq refundReq, RegisterOrderDon registerOrderDon) throws Exception;

    void wxRefundNotify(Map<String, String> map) throws Exception;

    void updateAppleAutoStatus(Long orderId);

    CouponUserView spotifyUnLimit(SpotifyUnLimitRecord spotifyUnLimitRecord);

    CouponUserView getAvailableSpotifyCoupon(long userId);

	void unifiedRefund(OrderRefundReq refundReq) throws Exception;

    AliPayParams zfbUnifiedPay(AlipayOrderDonReq re) throws Exception;

    void aliPayNotify(Map<String, String> params) throws Exception;
}
