Authored by zhengwen.ge

手工开奖也算活动结束

... ... @@ -2,6 +2,8 @@ package com.yoho.queue.dal;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.yoho.queue.dal.model.DrawlineActivityLuckydraw;
public interface IDrawlineActivityLuckydrawDAO {
... ... @@ -18,4 +20,6 @@ public interface IDrawlineActivityLuckydrawDAO {
int updateByPrimaryKey(DrawlineActivityLuckydraw record);
int insertBatch(List<DrawlineActivityLuckydraw> drawlineActivityLuckydrawList);
DrawlineActivityLuckydraw selectByIdAndStatus(@Param("id")int id,@Param("status")String status);
}
\ No newline at end of file
... ...
... ... @@ -113,4 +113,11 @@
(#{item.id}, #{item.endTime}, #{item.drawStatus}, #{item.status}, #{item.createTime}, #{item.updateTime})
</foreach>
</insert>
<select id="selectByIdAndStatus" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from drawline_activity_luckydraw
where id = #{id,jdbcType=INTEGER} and status = '1' limit 1;
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -16,10 +16,12 @@ import com.yoho.activity.queue.service.IDrawlineUserActivityInfoService;
import com.yoho.core.rest.client.ServiceCaller;
import com.yoho.error.exception.ServiceException;
import com.yoho.queue.dal.IDrawlineActivityDAO;
import com.yoho.queue.dal.IDrawlineActivityLuckydrawDAO;
import com.yoho.queue.dal.IDrawlineLuckyUserDAO;
import com.yoho.queue.dal.IDrawlinePrizeSettingDAO;
import com.yoho.queue.dal.IDrawlineUserQueueDAO;
import com.yoho.queue.dal.model.DrawlineActivity;
import com.yoho.queue.dal.model.DrawlineActivityLuckydraw;
import com.yoho.queue.dal.model.DrawlineLuckyUser;
import com.yoho.queue.dal.model.DrawlinePrizeSetting;
import com.yoho.queue.dal.model.DrawlineUserQueue;
... ... @@ -44,7 +46,10 @@ public class DrawlineUserActivityInfoServiceImpl implements IDrawlineUserActivit
@Autowired
private IDrawlineLuckyUserDAO drawlineLuckyUserDAO;
@Autowired
private IDrawlineActivityDAO drawlineActivityDAO;
private IDrawlineActivityDAO drawlineActivityDAO;
@Autowired
private IDrawlineActivityLuckydrawDAO drawlineActivityLuckydrawDAO;
@Autowired
private ServiceCaller service;
@Autowired
... ... @@ -136,7 +141,11 @@ public class DrawlineUserActivityInfoServiceImpl implements IDrawlineUserActivit
isActivityEnd = true;
}
}
//手工开奖也算活动结束
DrawlineActivityLuckydraw activityLuckydraw = drawlineActivityLuckydrawDAO.selectByIdAndStatus(activityId, "1");
if(null !=activityLuckydraw){
isActivityEnd = true;
}
// 10、构造prompt(活动结束了才有提示信息)
DlUserActivityInfoPrompt prompt = null;
if (isActivityEnd) {
... ...