Authored by tanling

是否推送支付单加开关

package com.yohoufo.order.service.support;
import com.yoho.core.config.ConfigReader;
import com.yohobuy.ufo.model.order.common.OrderAttributes;
import com.yohobuy.ufo.model.order.common.Payment;
import com.yohoufo.dal.order.BuyerOrderMapper;
... ... @@ -40,6 +41,15 @@ public class CustomsSupportService {
BuyerOrderCancelService buyerOrderCancelService;
@Autowired
private ConfigReader configReader;
public boolean isOpenSendPaymentInfoToAlipay(){
return configReader.getBoolean("ufo.alipay.sendPaymentInfo.switch", false);
}
/**
* 推送支付单到海关
* @param orderCode
... ... @@ -47,6 +57,11 @@ public class CustomsSupportService {
*/
public void sendPaymentInfoToCustoms(long orderCode, int uid){
if (!isOpenSendPaymentInfoToAlipay()) {
logger.info("sendPaymentInfoToCustoms switch close, {}, {}", orderCode, uid );
return;
}
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(orderCode);
if (buyerOrder == null){
logger.warn("sendPaymentInfoToCustoms orderCode info not exist {},{}", orderCode, uid);
... ...
... ... @@ -157,3 +157,5 @@ ufo.certification.timesLimit=3
# Unionpay
unionpay.env=00
unionpay.notifyurl=http://testapi.yohops.com/payment/ufo_unionpay_notify
ufo.alipay.sendPaymentInfo.switch=false
... ...