|
|
|
@ -350,6 +350,12 @@ public class LotteryService {
|
|
|
|
|
// 校验用户是否可参与
|
|
|
|
|
UserInfo userInfo = userInfoDao.findById(userLoginDto.getUserId()).get();
|
|
|
|
|
|
|
|
|
|
// 已参与抽奖,不能再次参与
|
|
|
|
|
LotteryUser byLotteryIdAndUserId = lotteryUserDao.findByLotteryIdAndUserId(id, userLoginDto.getUserId());
|
|
|
|
|
if(byLotteryIdAndUserId != null) {
|
|
|
|
|
throw new BizException(ErrorConstants.ALREADY_PARTICIPATED);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Integer participant = lottery.getParticipant();
|
|
|
|
|
if (Objects.equals(participant, PointEnums.LOTTERY_ALL_MEMBER.getCode())) {
|
|
|
|
|
// 会员可参与
|
|
|
|
|