| | |
| | | IHouseholdService householdService = SpringUtils.getBean(IHouseholdService.class); |
| | | HouseholdEntity householdEntity = householdService.getOne(Wrappers.<HouseholdEntity>lambdaQuery() |
| | | .eq(HouseholdEntity::getHouseCode, userTopics.getHouseCode()) |
| | | .eq(HouseholdEntity::getAssociatedUserId,AuthUtil.getUserId()) |
| | | .eq(HouseholdEntity::getIsDeleted,0) |
| | | .eq(HouseholdEntity::getAssociatedUserId, AuthUtil.getUserId()) |
| | | .eq(HouseholdEntity::getIsDeleted, 0) |
| | | .last("limit 1")); |
| | | if (householdEntity != null) { |
| | | userTopics.setHouseholdId(householdEntity.getId()); |
| | |
| | | IHouseholdService householdService = SpringUtils.getBean(IHouseholdService.class); |
| | | HouseholdEntity householdEntity = householdService.getOne(Wrappers.<HouseholdEntity>lambdaQuery() |
| | | .eq(HouseholdEntity::getHouseCode, topics.get(0).getHouseCode()) |
| | | .eq(HouseholdEntity::getAssociatedUserId,AuthUtil.getUserId()) |
| | | .eq(HouseholdEntity::getIsDeleted,0) |
| | | .eq(HouseholdEntity::getAssociatedUserId, AuthUtil.getUserId()) |
| | | .eq(HouseholdEntity::getIsDeleted, 0) |
| | | .last("limit 1")); |
| | | IPublicDiscussService bean = SpringUtil.getBean(IPublicDiscussService.class); |
| | | PublicDiscussEntity one = bean.getOne(Wrappers.<PublicDiscussEntity>lambdaQuery().eq(PublicDiscussEntity::getArticleId, topics.get(0).getArticleId())); |
| | |
| | | .eq(UserTopicsEntity::getArticleId, topics.get(0).getArticleId())); |
| | | if (count > 0) { |
| | | return "您已投票,不能重复投票!"; |
| | | } |
| | | } |
| | | for (TopicsVO topic : topics) { |
| | | if (topic.getMandatoryFlag().equals(2)) { |
| | | if (topic.getOptionNumberMin() > 1) { |
| | | JSONArray objects1 = JSON.parseArray(topic.getSelected()); |
| | | if (objects1.size() < topic.getOptionNumberMin()) { |
| | | return topic.getDiscussContent() + ":议题最少需要选择" + topic.getOptionNumberMin() + "项"; |
| | | } |
| | | } |
| | | if (topic.getOptionNumber() > 1) { |
| | | JSONArray objects1 = JSON.parseArray(topic.getSelected()); |
| | | if (objects1.size() > topic.getOptionNumber()) { |
| | | return topic.getDiscussContent() + ":议题最多需要选择" + topic.getOptionNumber() + "项"; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | Boolean userTopics = getaBoolean(topics,householdEntity); |
| | |
| | | IHouseholdService householdService = SpringUtils.getBean(IHouseholdService.class); |
| | | HouseholdEntity householdEntity = householdService.getOne(Wrappers.<HouseholdEntity>lambdaQuery() |
| | | .eq(HouseholdEntity::getHouseCode, userTopics.getHouseCode()) |
| | | .eq(HouseholdEntity::getAssociatedUserId,AuthUtil.getUserId()) |
| | | .eq(HouseholdEntity::getIsDeleted,0) |
| | | .eq(HouseholdEntity::getAssociatedUserId, AuthUtil.getUserId()) |
| | | .eq(HouseholdEntity::getIsDeleted, 0) |
| | | .last("limit 1")); |
| | | if (householdEntity != null) { |
| | | userTopics.setHouseholdId(householdEntity.getId()); |