package com.hfkj.service.pay.impl;

import com.hfkj.service.pay.NotifyService;
import com.hfkj.service.pay.PayService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.*;

/**
 * @Auther: 胡锐
 * @Description:
 * @Date: 2021/3/27 00:35
 */
@Service("goodsOrderService")
public class GoodsOrderServiceImpl implements PayService {

    private static Logger log = LoggerFactory.getLogger(GoodsOrderServiceImpl.class);

    @Resource
    private NotifyService notifyService;

    @Override
    @Transactional(propagation= Propagation.REQUIRES_NEW)
    public void paySuccess(Map<String, String> map, String payType) throws Exception {
        if (payType.equals("Alipay")) {
            // 支付宝支付 todo 暂未开发
            return;
        }
        if (payType.equals("WechatPay")) {
           // 微信支付
        }
    }

}
