...
|
...
|
@@ -271,13 +271,7 @@ public class TradeBillsServiceImpl implements ITradeBillsService { |
|
|
|
|
|
private Map<Integer, String> getTransferOutTradeNoMap(List<TradeBills> tradeBillsList) {
|
|
|
List<Long> orderCodes = tradeBillsList.stream()
|
|
|
.filter(item-> {
|
|
|
MoneyTypeEnum moneyTypeEnum = MoneyTypeEnum.getMoneyTypeByUserTypeAndTradeType(item.getUserType(), item.getTradeType());
|
|
|
return moneyTypeEnum == MoneyTypeEnum.deposit_rebate
|
|
|
|| moneyTypeEnum == MoneyTypeEnum.buyer_compensatoryPayment
|
|
|
|| moneyTypeEnum == MoneyTypeEnum.seller_goodsPayment
|
|
|
|| moneyTypeEnum == MoneyTypeEnum.seller_compensatoryPayment ;
|
|
|
})
|
|
|
.filter(item-> isTransferTrade(item))
|
|
|
.map(TradeBills::getOrderCode)
|
|
|
.collect(Collectors.toList());
|
|
|
if(CollectionUtils.isEmpty(orderCodes)){
|
...
|
...
|
@@ -288,6 +282,14 @@ public class TradeBillsServiceImpl implements ITradeBillsService { |
|
|
.collect(Collectors.toMap(TradeBillsTransferOutTradeNo::getId,TradeBillsTransferOutTradeNo::getOutTradeNo));
|
|
|
}
|
|
|
|
|
|
private boolean isTransferTrade(TradeBills tradeBills){
|
|
|
MoneyTypeEnum moneyTypeEnum = MoneyTypeEnum.getMoneyTypeByUserTypeAndTradeType(tradeBills.getUserType(), tradeBills.getTradeType());
|
|
|
return moneyTypeEnum == MoneyTypeEnum.deposit_rebate
|
|
|
|| moneyTypeEnum == MoneyTypeEnum.buyer_compensatoryPayment
|
|
|
|| moneyTypeEnum == MoneyTypeEnum.seller_goodsPayment
|
|
|
|| moneyTypeEnum == MoneyTypeEnum.seller_compensatoryPayment ;
|
|
|
}
|
|
|
|
|
|
public AuthorizeResultRespVO queryAuthorizeInfoByUid(Integer uid){
|
|
|
if(uid==null||uid<=0){
|
|
|
return null;
|
...
|
...
|
@@ -361,7 +363,14 @@ public class TradeBillsServiceImpl implements ITradeBillsService { |
|
|
resp.setPaidOrderCode(Optional.ofNullable(item.getPaidOrderCode())
|
|
|
.filter(e -> e > 0)
|
|
|
.map(Object::toString)
|
|
|
.orElseGet(() -> outTradeNoMap.getOrDefault(item.getId(), outTradeNoMap.getOrDefault(item.getDealRelateId(), "-"))));
|
|
|
.orElseGet(() -> {
|
|
|
String defaultValue = "-";
|
|
|
if(isTransferTrade(item)){
|
|
|
return outTradeNoMap.getOrDefault(item.getId(), outTradeNoMap.getOrDefault(item.getDealRelateId(), defaultValue));
|
|
|
}else {
|
|
|
return defaultValue;
|
|
|
}
|
|
|
}));
|
|
|
resp.setAmount(item.getAmount());
|
|
|
resp.setIncomeOutcome(item.getIncomeOutcome());
|
|
|
resp.setCreateTimeStr(null == item.getCreateTime() ? StringUtils.EMPTY
|
...
|
...
|
|