Authored by LUOXC

Merge branch 'hotfix-tradbill' into test6.9.16

@@ -85,7 +85,15 @@ @@ -85,7 +85,15 @@
85 </select> 85 </select>
86 86
87 <select id="selectTransferOutTradeNoByOrderCodes" resultType="com.yoho.order.model.TradeBillsTransferOutTradeNo"> 87 <select id="selectTransferOutTradeNoByOrderCodes" resultType="com.yoho.order.model.TradeBillsTransferOutTradeNo">
88 - select tb.id, concat(t.id, '_', tb.id) as outTradeNo,order_code as orderCode 88 + select tb.id,
  89 + CASE t.interface_type
  90 + WHEN 2 THEN
  91 + concat(t.id, '_', tb.id)
  92 + WHEN 3 THEN
  93 + '钱包'
  94 + END
  95 + as outTradeNo,
  96 + order_code as orderCode
89 FROM 97 FROM
90 trade_bills tb 98 trade_bills tb
91 LEFT JOIN orders_pay_transfer t ON t.buyer_order_code = tb.order_code 99 LEFT JOIN orders_pay_transfer t ON t.buyer_order_code = tb.order_code
@@ -94,6 +102,7 @@ @@ -94,6 +102,7 @@
94 #{orderCode} 102 #{orderCode}
95 </foreach> 103 </foreach>
96 AND tb.trade_status != 100 104 AND tb.trade_status != 100
  105 + and t.interface_type = 2
97 </select> 106 </select>
98 107
99 </mapper> 108 </mapper>
@@ -271,13 +271,16 @@ public class TradeBillsServiceImpl implements ITradeBillsService { @@ -271,13 +271,16 @@ public class TradeBillsServiceImpl implements ITradeBillsService {
271 } 271 }
272 272
273 private Map<Integer, String> getTransferOutTradeNoMap(List<TradeBills> tradeBillsList) { 273 private Map<Integer, String> getTransferOutTradeNoMap(List<TradeBills> tradeBillsList) {
274 - List<Long> orderCodes = tradeBillsList.stream().filter(item-> { 274 + List<Long> orderCodes = tradeBillsList.stream()
  275 + .filter(item-> {
275 MoneyTypeEnum moneyTypeEnum = MoneyTypeEnum.getMoneyTypeByUserTypeAndTradeType(item.getUserType(), item.getTradeType()); 276 MoneyTypeEnum moneyTypeEnum = MoneyTypeEnum.getMoneyTypeByUserTypeAndTradeType(item.getUserType(), item.getTradeType());
276 return moneyTypeEnum == MoneyTypeEnum.deposit_rebate 277 return moneyTypeEnum == MoneyTypeEnum.deposit_rebate
277 || moneyTypeEnum == MoneyTypeEnum.buyer_compensatoryPayment 278 || moneyTypeEnum == MoneyTypeEnum.buyer_compensatoryPayment
278 || moneyTypeEnum == MoneyTypeEnum.seller_goodsPayment 279 || moneyTypeEnum == MoneyTypeEnum.seller_goodsPayment
279 || moneyTypeEnum == MoneyTypeEnum.seller_compensatoryPayment ; 280 || moneyTypeEnum == MoneyTypeEnum.seller_compensatoryPayment ;
280 - }).map(TradeBills::getOrderCode).collect(Collectors.toList()); 281 + })
  282 + .map(TradeBills::getOrderCode)
  283 + .collect(Collectors.toList());
281 if(CollectionUtils.isEmpty(orderCodes)){ 284 if(CollectionUtils.isEmpty(orderCodes)){
282 return Maps.newHashMap(); 285 return Maps.newHashMap();
283 } 286 }