|
|
|
@ -29,6 +29,7 @@ import java.time.LocalDateTime; |
|
|
|
import java.time.ZoneOffset; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Objects; |
|
|
|
import java.util.UUID; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
@ -84,10 +85,10 @@ public class CashCollectionServiceImpl implements CashCollectionService { |
|
|
|
throw new IllegalArgumentException("数量单位不能为空"); |
|
|
|
} |
|
|
|
} |
|
|
|
if (cashCollection.getPaymentCurrency() == null || cashCollection.getPaymentCurrency().isEmpty()) { |
|
|
|
if (cashCollection.getPaymentCurrencyOrig() == null || cashCollection.getPaymentCurrencyOrig().isEmpty()) { |
|
|
|
throw new IllegalArgumentException("支付币种不能为空"); |
|
|
|
} |
|
|
|
if (cashCollection.getPaymentAmount() == null || cashCollection.getPaymentAmount().compareTo(BigDecimal.ZERO) == 0) { |
|
|
|
if (cashCollection.getPaymentAmountOrig() == null || cashCollection.getPaymentAmountOrig().compareTo(BigDecimal.ZERO) == 0) { |
|
|
|
throw new IllegalArgumentException("支付金额不能为空"); |
|
|
|
} |
|
|
|
if (cashCollection.getPayType() == null|| cashCollection.getPayType().isEmpty()) { |
|
|
|
@ -112,8 +113,8 @@ public class CashCollectionServiceImpl implements CashCollectionService { |
|
|
|
cashRecord.setNumUnit(cashCollection.getNumUnit()); //数量单位 |
|
|
|
cashRecord.setPermanentGold(cashCollection.getPermanentGold()); //永久金币 |
|
|
|
cashRecord.setFreeGold(cashCollection.getFreeGold()); //免费金币 |
|
|
|
cashRecord.setPaymentCurrency(cashCollection.getPaymentCurrency()); //付款币种 |
|
|
|
cashRecord.setPaymentAmount(cashCollection.getPaymentAmount()); //付款金额 |
|
|
|
cashRecord.setPaymentCurrencyOrig(cashCollection.getPaymentCurrencyOrig()); //付款币种 |
|
|
|
cashRecord.setPaymentAmountOrig(cashCollection.getPaymentAmountOrig()); //付款金额 |
|
|
|
cashRecord.setReceivedMarket(cashCollection.getReceivedMarket()); //到账地区 |
|
|
|
cashRecord.setPayType(cashCollection.getPayType()); //支付方式 |
|
|
|
cashRecord.setPayTime(cashCollection.getPayTime()); //付款时间 |
|
|
|
@ -338,7 +339,9 @@ public class CashCollectionServiceImpl implements CashCollectionService { |
|
|
|
//补全手续费等内容 |
|
|
|
@Override |
|
|
|
public String complete(CashRecord cashRecord) { |
|
|
|
|
|
|
|
if (!Objects.equals(cashRecord.getPaymentCurrency(), cashRecord.getReceivedCurrency())){ |
|
|
|
throw new IllegalArgumentException("支付币种(转换后)和到账币种不一致"); |
|
|
|
} |
|
|
|
|
|
|
|
int rows = cashCollectionMapper.complete(cashRecord); |
|
|
|
|
|
|
|
@ -429,7 +432,7 @@ public User getNameAndMarket(Integer jwcode) { |
|
|
|
|
|
|
|
cashRecord.setMarket(cashCollectionMapper.getMarketByJwcode(gOrder.getJwcode())); |
|
|
|
if (gOrder.getType().equals("gold")){ //充金豆 |
|
|
|
cashRecord.setActivity("Link日常充值"); |
|
|
|
cashRecord.setActivity("99"); |
|
|
|
cashRecord.setGoodsName("Link充值金豆"); |
|
|
|
cashRecord.setRemark("Link充值金豆"); |
|
|
|
cashRecord.setNumUnit("个"); |
|
|
|
@ -438,7 +441,7 @@ public User getNameAndMarket(Integer jwcode) { |
|
|
|
|
|
|
|
} |
|
|
|
if (gOrder.getType().equals("gold_coin")){//充金币 |
|
|
|
cashRecord.setActivity("Link日常充值"); |
|
|
|
cashRecord.setActivity("98"); |
|
|
|
cashRecord.setGoodsName("Link充值金币"); |
|
|
|
cashRecord.setRemark("Link充值金币"); |
|
|
|
cashRecord.setPermanentGold(gOrder.getCount()*100); |
|
|
|
|