From c3ac8adc5af7d04193c70d09c029e37efef8144d Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Wed, 28 Feb 2024 15:07:36 +0800
Subject: [PATCH] 街道管理员查询不出物业公司(物业公司加一列)
---
src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java b/src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java
index cde7f24..3517b07 100644
--- a/src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java
+++ b/src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java
@@ -83,13 +83,17 @@
PublicDiscussEntity one = bean.getOne(Wrappers.<PublicDiscussEntity>lambdaQuery().eq(PublicDiscussEntity::getArticleId, topics.get(0).getArticleId()));
// 一户一票
if (one.getVoteRestrictions().equals(CommonConstant.NUMBER_ONE)) {
- long count = count(Wrappers.<UserTopicsEntity>lambdaQuery().eq(UserTopicsEntity::getHouseCode, topics.get(0).getHouseCode()));
+ long count = count(Wrappers.<UserTopicsEntity>lambdaQuery()
+ .eq(UserTopicsEntity::getHouseCode, topics.get(0).getHouseCode())
+ .eq(UserTopicsEntity::getArticleId,topics.get(0).getArticleId()));
if (count > 1) {
throw new Exception("您的房屋已投票,不能重复投票!");
}
} else {
//
- long count = count(Wrappers.<UserTopicsEntity>lambdaQuery().eq(UserTopicsEntity::getUserId, AuthUtil.getUserId()));
+ long count = count(Wrappers.<UserTopicsEntity>lambdaQuery()
+ .eq(UserTopicsEntity::getUserId, AuthUtil.getUserId())
+ .eq(UserTopicsEntity::getArticleId,topics.get(0).getArticleId()));
if (count > 1) {
throw new Exception("您的已投票,不能重复投票!");
}
--
Gitblit v1.9.3