1
|
package com.yoho.activity.queue.convert;
|
1
|
package com.yoho.activity.queue.convert;
|
2
|
|
2
|
|
3
|
import java.util.ArrayList;
|
3
|
import java.util.ArrayList;
|
|
|
4
|
+import java.util.HashMap;
|
4
|
import java.util.List;
|
5
|
import java.util.List;
|
5
|
import java.util.Map;
|
6
|
import java.util.Map;
|
6
|
|
7
|
|
|
@@ -36,6 +37,10 @@ public class DrawlineUserQueueConvert { |
|
@@ -36,6 +37,10 @@ public class DrawlineUserQueueConvert { |
36
|
if (null == drawlineUserQueueList) {
|
37
|
if (null == drawlineUserQueueList) {
|
37
|
return null;
|
38
|
return null;
|
38
|
}
|
39
|
}
|
|
|
40
|
+ Map<Integer, Integer> uidAndSortMap = new HashMap<>();
|
|
|
41
|
+ for (DrawlineUserQueue drawlineUserQueue : drawlineUserQueueList){
|
|
|
42
|
+ uidAndSortMap.put(drawlineUserQueue.getUid(), drawlineUserQueue.getSort());
|
|
|
43
|
+ }
|
39
|
List<DrawlineUserQueueRespBO> drawlineUserQueueRespBOList = new ArrayList<DrawlineUserQueueRespBO>();
|
44
|
List<DrawlineUserQueueRespBO> drawlineUserQueueRespBOList = new ArrayList<DrawlineUserQueueRespBO>();
|
40
|
DrawlineUserQueueRespBO drawlineUserQueueRespBO;
|
45
|
DrawlineUserQueueRespBO drawlineUserQueueRespBO;
|
41
|
DrawlineLuckyUser drawlineLuckyUser;
|
46
|
DrawlineLuckyUser drawlineLuckyUser;
|
|
@@ -52,6 +57,9 @@ public class DrawlineUserQueueConvert { |
|
@@ -52,6 +57,9 @@ public class DrawlineUserQueueConvert { |
52
|
drawlineLuckyUser = drawlineLuckyUserMap.get(String.valueOf(uid) + "_" + String.valueOf(userType));
|
57
|
drawlineLuckyUser = drawlineLuckyUserMap.get(String.valueOf(uid) + "_" + String.valueOf(userType));
|
53
|
userBaseRspBO = userBaseRspBOMap.get(uid);
|
58
|
userBaseRspBO = userBaseRspBOMap.get(uid);
|
54
|
drawlineVirtualUser = drawlineVirtualUserMap.get(uid);
|
59
|
drawlineVirtualUser = drawlineVirtualUserMap.get(uid);
|
|
|
60
|
+ if (!uidAndSortMap.get(drawlineUserQueue.getUid()).equals(drawlineUserQueue.getSort())){
|
|
|
61
|
+ drawlineVirtualUser = null;
|
|
|
62
|
+ }
|
55
|
drawlineUserQueueRespBO = toBOByDO(drawlineUserQueue, drawlineLuckyUser, userBaseRspBO, drawlineVirtualUser);
|
63
|
drawlineUserQueueRespBO = toBOByDO(drawlineUserQueue, drawlineLuckyUser, userBaseRspBO, drawlineVirtualUser);
|
56
|
if (null == drawlineUserQueueRespBO) {
|
64
|
if (null == drawlineUserQueueRespBO) {
|
57
|
continue;
|
65
|
continue;
|