Authored by zhaoqing

bug修复

package com.yoho.activity.queue.convert;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
... ... @@ -36,6 +37,10 @@ public class DrawlineUserQueueConvert {
if (null == drawlineUserQueueList) {
return null;
}
Map<Integer, Integer> uidAndSortMap = new HashMap<>();
for (DrawlineUserQueue drawlineUserQueue : drawlineUserQueueList){
uidAndSortMap.put(drawlineUserQueue.getUid(), drawlineUserQueue.getSort());
}
List<DrawlineUserQueueRespBO> drawlineUserQueueRespBOList = new ArrayList<DrawlineUserQueueRespBO>();
DrawlineUserQueueRespBO drawlineUserQueueRespBO;
DrawlineLuckyUser drawlineLuckyUser;
... ... @@ -52,6 +57,9 @@ public class DrawlineUserQueueConvert {
drawlineLuckyUser = drawlineLuckyUserMap.get(String.valueOf(uid) + "_" + String.valueOf(userType));
userBaseRspBO = userBaseRspBOMap.get(uid);
drawlineVirtualUser = drawlineVirtualUserMap.get(uid);
if (!uidAndSortMap.get(drawlineUserQueue.getUid()).equals(drawlineUserQueue.getSort())){
drawlineVirtualUser = null;
}
drawlineUserQueueRespBO = toBOByDO(drawlineUserQueue, drawlineLuckyUser, userBaseRspBO, drawlineVirtualUser);
if (null == drawlineUserQueueRespBO) {
continue;
... ...
... ... @@ -45,7 +45,7 @@ public class DrawlineUserQueueRest {
//对当前助力用户进行校验是否是重复助力排队
Boolean existFlag = drawlineUserQueueService.judgeHelpUserExist(drawlineUserQueueReqBO);
if (existFlag){
return new ApiResponse.ApiResponseBuilder().code(401).message("该用户已经助力过,不可重复助力").build();
return new ApiResponse.ApiResponseBuilder().code(9001).message("您已助力,不可重复助力").build();
}
int code = 200;
String message = "操作成功";
... ...
... ... @@ -50,7 +50,7 @@ public class ProductLimitUserHelpRest {
Boolean flag = iProductLimitUserHelpService.judgeHelpUserExist(limitProductHelpUserRequestBO);
if (flag){
logger.info("ProductLimitUserHelpRest addHelpUserInfo can not help repeat");
return new ApiResponse.ApiResponseBuilder().code(401).message("用户已经助力过,不可重复助力").build();
return new ApiResponse.ApiResponseBuilder().code(9001).message("您已参加过活动,请刷新重试").build();
}
iProductLimitUserHelpService.addHelpUserInfo(limitProductHelpUserRequestBO);
logger.info("ProductLimitUserHelpRest addHelpUserInfo success");
... ...