package com.bohuikeji.delivery.backstage.listener.pay;

import com.alibaba.fastjson.JSONObject;
import com.bohuikeji.frame.module.admin.base.MqListener;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.io.IOException;

/**
 * 微信支付回调监听
 * @author sjh
 * @date 2022/2/22 18:04
 **/
@Service
@Slf4j
@RequiredArgsConstructor
public class WeChartListener extends MqListener<JSONObject> {
    final PayCallBackService payCallBackService;
    @Override
    public boolean onReceive(JSONObject jsonObject) throws Exception {
        payCallBackService.getAllPay(jsonObject,null);
        return true;
    }

    @Override
    public void onError(JSONObject msg, Exception e) {

    }
}
