lin
2024-03-02 ac958ae9415d606eef7a19ce55b39adf2ce148b3
报名校验
1 files modified
4 ■■■■ changed files
src/main/java/org/springblade/modules/discuss/controller/UserPublicEnrollController.java 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/discuss/controller/UserPublicEnrollController.java
@@ -114,7 +114,7 @@
        // 一户一票
        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("您房屋已经报名,不能重复报名!");
@@ -122,7 +122,7 @@
            // 一人一票
        } 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("您已报名,不能重复报名!");