| | |
| | | // 一户一票 |
| | | if (one.getVoteRestrictions().equals(CommonConstant.NUMBER_ONE)) { |
| | | long count = userPublicEnrollService.count(Wrappers.<UserPublicEnrollEntity>lambdaQuery() |
| | | .eq(UserPublicEnrollEntity::getPublicDiscussId, userPublicEnroll.getPublicDiscussId()) |
| | | .eq(UserPublicEnrollEntity::getArticleId, userPublicEnroll.getArticleId()) |
| | | .eq(UserPublicEnrollEntity::getHouseCode, userPublicEnroll.getHouseCode())); |
| | | if (count > 0) { |
| | | return R.fail("您房屋已经报名,不能重复报名!"); |
| | |
| | | // 一人一票 |
| | | } else { |
| | | long count = userPublicEnrollService.count(Wrappers.<UserPublicEnrollEntity>lambdaQuery() |
| | | .eq(UserPublicEnrollEntity::getPublicDiscussId, userPublicEnroll.getPublicDiscussId()) |
| | | .eq(UserPublicEnrollEntity::getArticleId, userPublicEnroll.getArticleId()) |
| | | .eq(UserPublicEnrollEntity::getUserId, userPublicEnroll.getUserId())); |
| | | if (count > 0) { |
| | | return R.fail("您已报名,不能重复报名!"); |