Authored by zhengwen.ge

手工开奖也算活动结束

@@ -2,6 +2,8 @@ package com.yoho.queue.dal; @@ -2,6 +2,8 @@ package com.yoho.queue.dal;
2 2
3 import java.util.List; 3 import java.util.List;
4 4
  5 +import org.apache.ibatis.annotations.Param;
  6 +
5 import com.yoho.queue.dal.model.DrawlineActivityLuckydraw; 7 import com.yoho.queue.dal.model.DrawlineActivityLuckydraw;
6 8
7 public interface IDrawlineActivityLuckydrawDAO { 9 public interface IDrawlineActivityLuckydrawDAO {
@@ -18,4 +20,6 @@ public interface IDrawlineActivityLuckydrawDAO { @@ -18,4 +20,6 @@ public interface IDrawlineActivityLuckydrawDAO {
18 int updateByPrimaryKey(DrawlineActivityLuckydraw record); 20 int updateByPrimaryKey(DrawlineActivityLuckydraw record);
19 21
20 int insertBatch(List<DrawlineActivityLuckydraw> drawlineActivityLuckydrawList); 22 int insertBatch(List<DrawlineActivityLuckydraw> drawlineActivityLuckydrawList);
  23 +
  24 + DrawlineActivityLuckydraw selectByIdAndStatus(@Param("id")int id,@Param("status")String status);
21 } 25 }
@@ -113,4 +113,11 @@ @@ -113,4 +113,11 @@
113 (#{item.id}, #{item.endTime}, #{item.drawStatus}, #{item.status}, #{item.createTime}, #{item.updateTime}) 113 (#{item.id}, #{item.endTime}, #{item.drawStatus}, #{item.status}, #{item.createTime}, #{item.updateTime})
114 </foreach> 114 </foreach>
115 </insert> 115 </insert>
  116 +
  117 + <select id="selectByIdAndStatus" resultMap="BaseResultMap">
  118 + select
  119 + <include refid="Base_Column_List" />
  120 + from drawline_activity_luckydraw
  121 + where id = #{id,jdbcType=INTEGER} and status = '1' limit 1;
  122 + </select>
116 </mapper> 123 </mapper>
@@ -16,10 +16,12 @@ import com.yoho.activity.queue.service.IDrawlineUserActivityInfoService; @@ -16,10 +16,12 @@ import com.yoho.activity.queue.service.IDrawlineUserActivityInfoService;
16 import com.yoho.core.rest.client.ServiceCaller; 16 import com.yoho.core.rest.client.ServiceCaller;
17 import com.yoho.error.exception.ServiceException; 17 import com.yoho.error.exception.ServiceException;
18 import com.yoho.queue.dal.IDrawlineActivityDAO; 18 import com.yoho.queue.dal.IDrawlineActivityDAO;
  19 +import com.yoho.queue.dal.IDrawlineActivityLuckydrawDAO;
19 import com.yoho.queue.dal.IDrawlineLuckyUserDAO; 20 import com.yoho.queue.dal.IDrawlineLuckyUserDAO;
20 import com.yoho.queue.dal.IDrawlinePrizeSettingDAO; 21 import com.yoho.queue.dal.IDrawlinePrizeSettingDAO;
21 import com.yoho.queue.dal.IDrawlineUserQueueDAO; 22 import com.yoho.queue.dal.IDrawlineUserQueueDAO;
22 import com.yoho.queue.dal.model.DrawlineActivity; 23 import com.yoho.queue.dal.model.DrawlineActivity;
  24 +import com.yoho.queue.dal.model.DrawlineActivityLuckydraw;
23 import com.yoho.queue.dal.model.DrawlineLuckyUser; 25 import com.yoho.queue.dal.model.DrawlineLuckyUser;
24 import com.yoho.queue.dal.model.DrawlinePrizeSetting; 26 import com.yoho.queue.dal.model.DrawlinePrizeSetting;
25 import com.yoho.queue.dal.model.DrawlineUserQueue; 27 import com.yoho.queue.dal.model.DrawlineUserQueue;
@@ -46,6 +48,9 @@ public class DrawlineUserActivityInfoServiceImpl implements IDrawlineUserActivit @@ -46,6 +48,9 @@ public class DrawlineUserActivityInfoServiceImpl implements IDrawlineUserActivit
46 @Autowired 48 @Autowired
47 private IDrawlineActivityDAO drawlineActivityDAO; 49 private IDrawlineActivityDAO drawlineActivityDAO;
48 @Autowired 50 @Autowired
  51 + private IDrawlineActivityLuckydrawDAO drawlineActivityLuckydrawDAO;
  52 +
  53 + @Autowired
49 private ServiceCaller service; 54 private ServiceCaller service;
50 @Autowired 55 @Autowired
51 private RedisValueCache redisValueCache; 56 private RedisValueCache redisValueCache;
@@ -136,7 +141,11 @@ public class DrawlineUserActivityInfoServiceImpl implements IDrawlineUserActivit @@ -136,7 +141,11 @@ public class DrawlineUserActivityInfoServiceImpl implements IDrawlineUserActivit
136 isActivityEnd = true; 141 isActivityEnd = true;
137 } 142 }
138 } 143 }
139 - 144 + //手工开奖也算活动结束
  145 + DrawlineActivityLuckydraw activityLuckydraw = drawlineActivityLuckydrawDAO.selectByIdAndStatus(activityId, "1");
  146 + if(null !=activityLuckydraw){
  147 + isActivityEnd = true;
  148 + }
140 // 10、构造prompt(活动结束了才有提示信息) 149 // 10、构造prompt(活动结束了才有提示信息)
141 DlUserActivityInfoPrompt prompt = null; 150 DlUserActivityInfoPrompt prompt = null;
142 if (isActivityEnd) { 151 if (isActivityEnd) {