...
|
...
|
@@ -40,7 +40,7 @@ public class BigDataOrderInfoTask { |
|
|
return;
|
|
|
}
|
|
|
//订单列表转map key:orderCode value:OrderInfo
|
|
|
Map<Integer,OrderInfo> orderMap = Maps.uniqueIndex(orderInfoList, new Function<OrderInfo, Integer>() {
|
|
|
Map<Integer, OrderInfo> orderMap = Maps.uniqueIndex(orderInfoList, new Function<OrderInfo, Integer>() {
|
|
|
@Override
|
|
|
public Integer apply(OrderInfo input) {
|
|
|
return input.getOrderCode();
|
...
|
...
|
@@ -49,16 +49,16 @@ public class BigDataOrderInfoTask { |
|
|
//获取校验后的订单code
|
|
|
List<Integer> orderCodeList = null;
|
|
|
//按source分类
|
|
|
Map<Integer,List<OrderInfo>> orderInfoMap = Maps.newHashMap();
|
|
|
for(Integer orderCode : orderCodeList){
|
|
|
Map<Integer, List<OrderInfo>> orderInfoMap = Maps.newHashMap();
|
|
|
for (Integer orderCode : orderCodeList) {
|
|
|
OrderInfo orderInfo = orderMap.get(orderCode);
|
|
|
//为空直接return
|
|
|
if(null == orderInfo){
|
|
|
if (null == orderInfo) {
|
|
|
continue;
|
|
|
}
|
|
|
//组装分类
|
|
|
if(!orderInfoMap.containsKey(orderInfo.getClientId())){
|
|
|
orderInfoMap.put(orderInfo.getClientId(),Lists.newArrayList(orderInfo));
|
|
|
if (!orderInfoMap.containsKey(orderInfo.getClientId())) {
|
|
|
orderInfoMap.put(orderInfo.getClientId(), Lists.newArrayList(orderInfo));
|
|
|
continue;
|
|
|
}
|
|
|
orderInfoMap.get(orderInfo.getClientId()).add(orderInfo);
|
...
|
...
|
|