| | |
| | | tCommunityActivity.setUserNum(tCommunityActivityRegistrations.size()); |
| | | String finalUserId = userId; |
| | | if (finalUserId != null) { |
| | | long count = tCommunityActivityRegistrations.stream().filter(e -> e.getAppUserId().equals(finalUserId)).count(); |
| | | if(count>0){ |
| | | tCommunityActivity.setState(2); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | if (count > 0) { |
| | | tCommunityActivity.setUserNum((int) count); |
| | | } |
| | | if(userId!=null){ |
| | | if (userId != null) { |
| | | tCommunityActivity.setState(tCommunityActivityRegistrationService.count(new LambdaQueryWrapper<TCommunityActivityRegistration>().eq(TCommunityActivityRegistration::getActivityId, id).eq(TCommunityActivityRegistration::getAppUserId, userId)) > 0 ? 2 : 1); |
| | | } |
| | | return R.ok(tCommunityActivity); |