package cn.pluss.platform.notify;

import cn.pluss.platform.entity.MerchantOrder;
import cn.pluss.platform.entity.MerchantOrderSplit;
import com.alibaba.fastjson.JSONObject;
import org.springframework.scheduling.annotation.Async;

import java.util.Date;
import java.util.Map;

/**
 * 异步消息推送Service
 */
public interface NotifyMessageService {

    void sendNotifyMessage(MerchantOrder order, Map<String,Object> params) throws Exception;

    void sendNotifyMessage(String notifyUrl,Map<String,Object> params) throws Exception;

    void sendMqttMessage(MerchantOrder order, Date payDate, String type ,JSONObject json,String storeId,int payType);

    void sendCancelPayMessage(JSONObject params);

    /**
     * 发送支付成功消息
     * @param order
     * @param pay
     * @param params
     * @param mercId
     */
    void sendPayMessage(MerchantOrder order, String pay, JSONObject params, String mercId);

    void sendLowerPayNotifyCallback(MerchantOrder order);

    /**
     * 推送分账通知
     * @param orderSplit
     */
    void sendLowerSplitNotify(MerchantOrderSplit orderSplit);
}
