From c18940df8db1d523c1b25763e358c9ac89ed7113 Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期四, 16 五月 2024 16:24:54 +0800
Subject: [PATCH] 修改花城 随手拍 列表数据范围 新增小程序 随手拍删除接口
---
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java | 51 +++++++++++++++++++++++++++++++++++++++------------
1 files changed, 39 insertions(+), 12 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java
index f28bf2a..0b2dd31 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java
@@ -22,6 +22,7 @@
import com.panzhihua.common.service.community.CommunityWestService;
import com.panzhihua.common.service.partybuilding.PartyBuildingService;
import com.panzhihua.common.service.user.UserService;
+import com.panzhihua.common.utlis.StringUtils;
import com.panzhihua.common.validated.AddGroup;
import com.panzhihua.common.validated.PageGroup;
import io.swagger.annotations.*;
@@ -75,10 +76,10 @@
@ApiOperation(value = "分页获取社区动态", response = ComActDynVO.class)
@PostMapping("pagedynamic")
public R pageDynamic(@RequestBody ComActDynVO comActDynVO) {
- LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
- if (loginUserInfo != null) {
- comActDynVO.setCommunityId(loginUserInfo.getCommunityId());
- }
+// LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
+// if (loginUserInfo != null) {
+// comActDynVO.setCommunityId(loginUserInfo.getCommunityId()+"");
+// }
comActDynVO.setIsTopping(null);
comActDynVO.setStatus(1);
Integer category = comActDynVO.getCategory();
@@ -87,6 +88,19 @@
}
return communityService.pageDynamic(comActDynVO);
}
+
+ @ApiOperation(value = "分页查项目活动")
+ @PostMapping("projectPageActivity")
+ public R projectPageActivity(@RequestBody ComActActivityVO comActActivityVO) {
+ Long projectId = comActActivityVO.getProjectId();
+ if (isNull(projectId)) {
+ Long communityId = this.getCommunityId();
+ comActActivityVO.setCommunityId(communityId);
+ }
+ // return communityService.pageActivity(ComActActivityVO);
+ return communityService.pageActivityCommunityBack(comActActivityVO);
+ }
+
@ApiOperation(value = "社区动态详情", response = ComActDynVO.class)
@GetMapping("detaildynamic")
@@ -117,11 +131,16 @@
@ApiOperation(value = "分页查询社区活动", response = ComActActivityVO.class)
@PostMapping("pageactivity")
- public R pageActivity(@RequestBody ComActActivityVO comActActivityVO) {
- LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
- if (loginUserInfo != null) {
- comActActivityVO.setCommunityId(loginUserInfo.getCommunityId());
+ public R pageActivity(@RequestBody ComActActivityVO comActActivityVO)
+ {
+ if(comActActivityVO.getCommunityId()<=0)
+ {
+ LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
+ if (loginUserInfo != null) {
+ comActActivityVO.setCommunityId(loginUserInfo.getCommunityId());
+ }
}
+
comActActivityVO.setIsApplets(1);
Integer status = comActActivityVO.getStatus();
if (null != status && status.intValue() == 4) {
@@ -168,7 +187,7 @@
if (StrUtil.isNotBlank(evaluateContent)) {
String result = checkService.checkMessageBy(evaluateContent, openid, appId);
if (StrUtil.isNotBlank(result)) {
- return R.fail(Constants.NOTICE_FAIL, "填写内容存在 " + result + " 违规信息");
+ return R.fail(501, "填写内容存在 " + result + " 违规信息");
}
}
@@ -176,7 +195,7 @@
String photo = comActActEvaluateVO.getPhoto();
if (StrUtil.isNotBlank(photo)) {
if (!checkService.checkImageBy(photo, appId)) {
- return R.fail(Constants.NOTICE_FAIL, "上传图片存在违规信息");
+ return R.fail(501, "上传图片存在违规信息");
}
}
return communityService.activityEvaluate(comActActEvaluateVO);
@@ -435,8 +454,10 @@
@RequestParam(value = "page", required = false) Integer page,
@RequestParam(value = "size", required = false) Integer size,
@RequestParam(value = "belongTo", required = false) String belongTo,
- @RequestParam(value = "unitId", required = false) Long unitId) {
- return communityService.institutionalUnitServiceAnalysis(year, type, range, communityId, page, size, belongTo, unitId, this.getLoginUserInfo().getAccount());
+ @RequestParam(value = "unitId", required = false) Long unitId,
+ @RequestParam(value = "searchContent",required = false) String searchContent) {
+ return communityService.institutionalUnitServiceAnalysis(year, type, range, communityId, page,
+ size, belongTo, unitId, this.getLoginUserInfo().getAccount(),searchContent);
}
@@ -464,4 +485,10 @@
public R detailCommunity(@RequestParam("id") Long id) {
return communityService.detailCommunity(id);
}
+
+ @ApiOperation(value = "获取问题清单,需求清单,报道服务活动数量",response = DataCount.class)
+ @GetMapping("/dataCount")
+ public R dataCount(){
+ return communityService.dataCount();
+ }
}
--
Gitblit v1.7.1