Commit 4b5c392b by yinyong

paymentDate为null

parent 40e481fd
...@@ -97,11 +97,6 @@ public class PayPalSyncJob extends PointJob { ...@@ -97,11 +97,6 @@ public class PayPalSyncJob extends PointJob {
try{ try{
for(DcBaseFinancePaypal paypal : data) { for(DcBaseFinancePaypal paypal : data) {
handleSourceJson(paypal); handleSourceJson(paypal);
Instant instant = paypal.getPaymentDate().toInstant();
ZoneId zone = ZoneId.systemDefault();
LocalDateTime paymentDate = LocalDateTime.ofInstant(instant, zone);
BigDecimal exchangeRate = CallBailunSystem.getExchangeRate(paypal.getCurrency(), CurrencyType.CNY.value(), paymentDate);
paypal.setOtherToCnyExchangeRate(exchangeRate);
DcBaseFinancePaypalMapper mapper = SessionUtil.getSession().getMapper(DcBaseFinancePaypalMapper.class); DcBaseFinancePaypalMapper mapper = SessionUtil.getSession().getMapper(DcBaseFinancePaypalMapper.class);
mapper.upsertSelective(paypal); mapper.upsertSelective(paypal);
} }
...@@ -122,6 +117,14 @@ public class PayPalSyncJob extends PointJob { ...@@ -122,6 +117,14 @@ public class PayPalSyncJob extends PointJob {
paypal.setPayerId(getValue(sourceJson, "PayerID\":")); paypal.setPayerId(getValue(sourceJson, "PayerID\":"));
paypal.setCurrencyId(getValue(sourceJson, "currencyID\":") == null ? 0 : Integer.parseInt(getValue(sourceJson, "currencyID\":")) ); paypal.setCurrencyId(getValue(sourceJson, "currencyID\":") == null ? 0 : Integer.parseInt(getValue(sourceJson, "currencyID\":")) );
paypal.setCurrency(CurrencyType.getVal(paypal.getCurrencyId())); paypal.setCurrency(CurrencyType.getVal(paypal.getCurrencyId()));
if(paypal.getPaymentDate() != null) {
Instant instant = paypal.getPaymentDate().toInstant();
ZoneId zone = ZoneId.systemDefault();
LocalDateTime paymentDate = LocalDateTime.ofInstant(instant, zone);
BigDecimal exchangeRate = CallBailunSystem.getExchangeRate(paypal.getCurrency(), CurrencyType.CNY.value(), paymentDate);
paypal.setOtherToCnyExchangeRate(exchangeRate);
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment