Authored by tanling

Merge branch 'test6.9.6' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.6

... ... @@ -15,6 +15,11 @@ public class TradeBills {
*/
public static final Integer PAY_TYPE_ALIPAY_OFFLINE_PAYMENT = 102;
/**
* 银行卡线下付款(手动打款)
*/
public static final Integer PAY_TYPE_BANK_CARD_OFFLINE_PAYMENT = 103;
private Integer id;
private Integer uid;
... ...
... ... @@ -64,6 +64,7 @@ import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiFunction;
import java.util.function.Function;
... ... @@ -1015,10 +1016,9 @@ public class PaymentServiceImpl implements IPaymentService {
lockKey.setDealUserName(req.getOperateUname());
throwServiceExceptionIf(!tryLock(logTag, lockKey), 500, "流水已经处理过id=" + tradeBills.getId());
// 财务手动标注为已付款
if(ManualDealRequest.SCENE_ID_MARK_PAID_ALIPAY_OFFLINE_PAYMENT == req.getSceneId()){
tradeBills.setPayType(TradeBills.PAY_TYPE_ALIPAY_OFFLINE_PAYMENT);
if (optMarkPaidPayType(req.getSceneId()).isPresent()) {
tradeBills.setPayType(optMarkPaidPayType(req.getSceneId()).get());
markPaid(logTag, tradeBills, lockKey);
}
// 退货款或普通用户退保证金
... ... @@ -1031,6 +1031,16 @@ public class PaymentServiceImpl implements IPaymentService {
}
}
private Optional<Integer> optMarkPaidPayType(int sceneId) {
if (ManualDealRequest.SCENE_ID_MARK_PAID_ALIPAY_OFFLINE_PAYMENT == sceneId) {
return Optional.of(TradeBills.PAY_TYPE_ALIPAY_OFFLINE_PAYMENT);
} else if (ManualDealRequest.SCENE_ID_MARK_PAID_BANK_CARD_OFFLINE_PAYMENT == sceneId) {
return Optional.of(TradeBills.PAY_TYPE_BANK_CARD_OFFLINE_PAYMENT);
} else {
return Optional.empty();
}
}
private void markPaid(String logTag, TradeBills tradeBills, TradeBills lockKey) {
try {
// 加新流水
... ...