|
|
|
@ -34,6 +34,7 @@ import javax.persistence.criteria.Root;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
|
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.data.domain.Page;
|
|
|
|
|
import org.springframework.data.domain.PageRequest;
|
|
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
|
@ -593,7 +594,7 @@ public class LotteryService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 抽奖详情
|
|
|
|
|
* 抽奖详情-PC
|
|
|
|
|
*
|
|
|
|
|
* @param lotteryId 抽奖id
|
|
|
|
|
* @return 抽奖详情
|
|
|
|
@ -645,6 +646,31 @@ public class LotteryService {
|
|
|
|
|
return lotteryDetailPCVO;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 抽奖详情-APP
|
|
|
|
|
*
|
|
|
|
|
* @param lotteryId 抽奖id
|
|
|
|
|
* @return 抽奖详情
|
|
|
|
|
*/
|
|
|
|
|
public LotteryDetailAPPVO getLotteryDetailAPPVO(String lotteryId) {
|
|
|
|
|
LotteryDetailPCVO lotteryDetailPCVO = getLotteryDetailPCVO(lotteryId);
|
|
|
|
|
LotteryDetailAPPVO result = new LotteryDetailAPPVO();
|
|
|
|
|
BeanUtils.copyProperties(lotteryDetailPCVO, result);
|
|
|
|
|
|
|
|
|
|
UserLoginDto userLoginDto = jwtUtil.getUser();
|
|
|
|
|
LotteryUser lotteryUser = lotteryUserDao.findByLotteryIdAndUserId(lotteryId, userLoginDto.getUserId());
|
|
|
|
|
if (lotteryUser != null) {
|
|
|
|
|
result.setIsParticipate(PointEnums.PARTICIPATED.getCode());
|
|
|
|
|
} else {
|
|
|
|
|
result.setIsParticipate(PointEnums.NOT_PARTICIPATED.getCode());
|
|
|
|
|
}
|
|
|
|
|
long participateNum = getParticipateNumByLotteryId(lotteryId);
|
|
|
|
|
// 设置抽奖人数
|
|
|
|
|
result.setParticipateNum(participateNum);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据抽奖id,用户类型获取抽奖用户列表
|
|
|
|
|
*
|
|
|
|
|