|
|
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);
|
...
|
...
|
|