...
|
...
|
@@ -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 {
|
|
|
// 加新流水
|
...
|
...
|
|