|
|
package com.yohoufo.order.service.handler.transfer;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yoho.core.config.ConfigReader;
|
|
|
import com.yohoufo.dal.order.model.OrdersPayTransfer;
|
|
|
import com.yohoufo.dal.order.model.TradeBills;
|
|
|
import com.yohoufo.order.common.TradeType;
|
|
|
import com.yohoufo.order.config.UfoOrderPayConfigReader;
|
|
|
import com.yohoufo.order.service.proxy.WalletTransferService;
|
|
|
import com.yohoufo.order.service.transfer.TransferResult;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
...
|
...
|
@@ -22,31 +21,13 @@ public class TransferChancelSelector { |
|
|
private volatile String lastTransferDate = null;
|
|
|
|
|
|
@Autowired
|
|
|
private ConfigReader configReader;
|
|
|
private UfoOrderPayConfigReader ufoOrderPayConfigReader;
|
|
|
|
|
|
@Autowired
|
|
|
private WalletTransferService walletTransferService;
|
|
|
|
|
|
/**
|
|
|
* 申请寄存返利的单数
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
public int getDepositRebateOrderCnt() {
|
|
|
return configReader.getInt("ufo.order.pay.depositRebateCnt", 4);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 申请寄存返利一单返利数目
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
public double getDepositRebateAmount() {
|
|
|
return configReader.getDouble("ufo.order.pay.depositRebatePerAmount", 30);
|
|
|
}
|
|
|
|
|
|
public boolean isTransferWithAlipayExceedMillionTransfer() {
|
|
|
boolean value = configReader.getBoolean("ufo.order.pay.exceedSwitch", false);
|
|
|
boolean value = ufoOrderPayConfigReader.transferWithAlipayExceedMillionTransferSwitch();
|
|
|
if (value) {
|
|
|
log.info("use exceed million ufo.order.pay.exceedSwitch={}", value);
|
|
|
return true;
|
...
|
...
|
@@ -57,7 +38,7 @@ public class TransferChancelSelector { |
|
|
|
|
|
public boolean isTransferWithWallet(TradeBills bills) {
|
|
|
boolean canTransfer = walletTransferService.canTransfer(bills);
|
|
|
boolean open = configReader.getBoolean("ufo.order.pay.transferWithWallet", false);
|
|
|
boolean open = ufoOrderPayConfigReader.transferWithWalletSwitch();
|
|
|
return canTransfer && open;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -67,9 +48,7 @@ public class TransferChancelSelector { |
|
|
|
|
|
|
|
|
public boolean isStopTransferWithAlipay() {
|
|
|
boolean isStop = configReader.getBoolean("ufo.order.pay.isStop.transfer", false);
|
|
|
log.info("zk config [ufo.order.pay.isStop.transfer] value {}", isStop);
|
|
|
return isStop;
|
|
|
return ufoOrderPayConfigReader.isStopTransfer();
|
|
|
}
|
|
|
|
|
|
public boolean isExceedMillion(JSONObject jsonObject) {
|
...
|
...
|
|