Showing
1 changed file
with
6 additions
and
2 deletions
@@ -6,6 +6,7 @@ import java.util.concurrent.Executors; | @@ -6,6 +6,7 @@ import java.util.concurrent.Executors; | ||
6 | import java.util.concurrent.ScheduledExecutorService; | 6 | import java.util.concurrent.ScheduledExecutorService; |
7 | import java.util.concurrent.TimeUnit; | 7 | import java.util.concurrent.TimeUnit; |
8 | 8 | ||
9 | +import org.apache.commons.lang.StringUtils; | ||
9 | import org.slf4j.Logger; | 10 | import org.slf4j.Logger; |
10 | import org.slf4j.LoggerFactory; | 11 | import org.slf4j.LoggerFactory; |
11 | import org.springframework.beans.factory.annotation.Autowired; | 12 | import org.springframework.beans.factory.annotation.Autowired; |
@@ -136,12 +137,15 @@ public class TimeTaskServiceImpl implements ITimeTaskService { | @@ -136,12 +137,15 @@ public class TimeTaskServiceImpl implements ITimeTaskService { | ||
136 | } | 137 | } |
137 | 138 | ||
138 | // (2)获取白名单排队列表,并用作最终中奖的排队列表 | 139 | // (2)获取白名单排队列表,并用作最终中奖的排队列表 |
140 | + List<DrawlineUserQueue> drawlineUserQueueList = new ArrayList<DrawlineUserQueue>(); | ||
139 | String whileList = drawlinePrizeSetting.getWhiteList(); | 141 | String whileList = drawlinePrizeSetting.getWhiteList(); |
140 | - List<DrawlineUserQueue> drawlineUserQueueList = drawlineUserQueueDAO.selectRealUserQueueByActIdAndUids(id, whileList); | 142 | + if (StringUtils.isNotEmpty(whileList)) { |
143 | + drawlineUserQueueList = drawlineUserQueueDAO.selectRealUserQueueByActIdAndUids(id, whileList); | ||
141 | logger.debug("luckyDraw: drawlineUserQueueDAO.selectRealUserQueueByActIdAndUids. activityId is {}, uids is {}", id, whileList); | 144 | logger.debug("luckyDraw: drawlineUserQueueDAO.selectRealUserQueueByActIdAndUids. activityId is {}, uids is {}", id, whileList); |
142 | if (null == drawlineUserQueueList) { | 145 | if (null == drawlineUserQueueList) { |
143 | drawlineUserQueueList = new ArrayList<DrawlineUserQueue>(); | 146 | drawlineUserQueueList = new ArrayList<DrawlineUserQueue>(); |
144 | } | 147 | } |
148 | + } | ||
145 | 149 | ||
146 | // (3)获取真实用户中奖数量,中奖排队列表,并加入到最终中奖的排队列表中 | 150 | // (3)获取真实用户中奖数量,中奖排队列表,并加入到最终中奖的排队列表中 |
147 | int realUserNum = drawlinePrizeSetting.getRealUserNum().intValue() - drawlineUserQueueList.size(); | 151 | int realUserNum = drawlinePrizeSetting.getRealUserNum().intValue() - drawlineUserQueueList.size(); |
@@ -265,7 +269,7 @@ public class TimeTaskServiceImpl implements ITimeTaskService { | @@ -265,7 +269,7 @@ public class TimeTaskServiceImpl implements ITimeTaskService { | ||
265 | return res; | 269 | return res; |
266 | } | 270 | } |
267 | 271 | ||
268 | - public void shutdownLuckyUserNotice(){ | 272 | + public void shutdownLuckyUserNotice() { |
269 | logger.info("Enter shutdownLuckyUserNotice"); | 273 | logger.info("Enter shutdownLuckyUserNotice"); |
270 | 274 | ||
271 | // 关闭定时任务线程 | 275 | // 关闭定时任务线程 |
-
Please register or login to post a comment