|
|
@ -309,6 +309,10 @@ public class LotteryService {
|
|
|
|
|
|
|
|
|
|
|
|
// 校验用户是否可参与
|
|
|
|
// 校验用户是否可参与
|
|
|
|
UserInfo userInfo = userInfoDao.findById(userLoginDto.getUserId()).get();
|
|
|
|
UserInfo userInfo = userInfoDao.findById(userLoginDto.getUserId()).get();
|
|
|
|
|
|
|
|
List<LotteryUser> list = lotteryUserDao.findByLotteryIdAndUserId(id, userLoginDto.getUserId());
|
|
|
|
|
|
|
|
if (list != null && !list.isEmpty()) {
|
|
|
|
|
|
|
|
throw new BizException(ErrorConstants.ALREADY_PARTICIPATED_CANNOT_PARTICIPATE_AGAIN);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Integer participant = lottery.getParticipant();
|
|
|
|
Integer participant = lottery.getParticipant();
|
|
|
|
if (Objects.equals(participant, PointEnums.LOTTERY_ALL_MEMBER.getCode())) {
|
|
|
|
if (Objects.equals(participant, PointEnums.LOTTERY_ALL_MEMBER.getCode())) {
|
|
|
|