Authored by LUOXC

Merge branch 'hotfix-tradbill' into test6.9.16

... ... @@ -85,7 +85,15 @@
</select>
<select id="selectTransferOutTradeNoByOrderCodes" resultType="com.yoho.order.model.TradeBillsTransferOutTradeNo">
select tb.id, concat(t.id, '_', tb.id) as outTradeNo,order_code as orderCode
select tb.id,
CASE t.interface_type
WHEN 2 THEN
concat(t.id, '_', tb.id)
WHEN 3 THEN
'钱包'
END
as outTradeNo,
order_code as orderCode
FROM
trade_bills tb
LEFT JOIN orders_pay_transfer t ON t.buyer_order_code = tb.order_code
... ... @@ -94,6 +102,7 @@
#{orderCode}
</foreach>
AND tb.trade_status != 100
and t.interface_type = 2
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -271,13 +271,16 @@ public class TradeBillsServiceImpl implements ITradeBillsService {
}
private Map<Integer, String> getTransferOutTradeNoMap(List<TradeBills> tradeBillsList) {
List<Long> orderCodes = tradeBillsList.stream().filter(item-> {
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 ;
}).map(TradeBills::getOrderCode).collect(Collectors.toList());
})
.map(TradeBills::getOrderCode)
.collect(Collectors.toList());
if(CollectionUtils.isEmpty(orderCodes)){
return Maps.newHashMap();
}
... ...