Showing
1 changed file
with
10 additions
and
6 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,11 +137,14 @@ public class TimeTaskServiceImpl implements ITimeTaskService { | @@ -136,11 +137,14 @@ 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); | ||
141 | - logger.debug("luckyDraw: drawlineUserQueueDAO.selectRealUserQueueByActIdAndUids. activityId is {}, uids is {}", id, whileList); | ||
142 | - if (null == drawlineUserQueueList) { | ||
143 | - drawlineUserQueueList = new ArrayList<DrawlineUserQueue>(); | 142 | + if (StringUtils.isNotEmpty(whileList)) { |
143 | + drawlineUserQueueList = drawlineUserQueueDAO.selectRealUserQueueByActIdAndUids(id, whileList); | ||
144 | + logger.debug("luckyDraw: drawlineUserQueueDAO.selectRealUserQueueByActIdAndUids. activityId is {}, uids is {}", id, whileList); | ||
145 | + if (null == drawlineUserQueueList) { | ||
146 | + drawlineUserQueueList = new ArrayList<DrawlineUserQueue>(); | ||
147 | + } | ||
144 | } | 148 | } |
145 | 149 | ||
146 | // (3)获取真实用户中奖数量,中奖排队列表,并加入到最终中奖的排队列表中 | 150 | // (3)获取真实用户中奖数量,中奖排队列表,并加入到最终中奖的排队列表中 |
@@ -264,8 +268,8 @@ public class TimeTaskServiceImpl implements ITimeTaskService { | @@ -264,8 +268,8 @@ public class TimeTaskServiceImpl implements ITimeTaskService { | ||
264 | logger.info("Leave LuckyUserNotice service: result is{}", res); | 268 | logger.info("Leave LuckyUserNotice service: result is{}", res); |
265 | return res; | 269 | return res; |
266 | } | 270 | } |
267 | - | ||
268 | - public void shutdownLuckyUserNotice(){ | 271 | + |
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