From 583a11b28dfba598b94e6f9a4d0d1875f6373c3d Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期二, 26 九月 2023 17:55:27 +0800
Subject: [PATCH] 配置文件
---
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActIntegralUserApi.java | 33 +++++++++++++++++++++++++--------
1 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActIntegralUserApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActIntegralUserApi.java
index cb3bf55..4d4aa95 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActIntegralUserApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActIntegralUserApi.java
@@ -2,6 +2,8 @@
import javax.annotation.Resource;
+import com.panzhihua.common.model.vos.community.integral.IntegralTradeVO;
+import io.swagger.annotations.ApiImplicitParam;
import org.springframework.web.bind.annotation.*;
import com.panzhihua.common.controller.BaseController;
@@ -43,14 +45,33 @@
return communityService.getIntegralReceiveApplets(userInfoVO.getUserId(), userInfoVO.getCommunityId());
}
- @ApiOperation(value = "查询我的积分列表", response = ComActIntegralUserVO.class)
- @PostMapping("/user/list")
- public R getIntegralUserList() {
+ @ApiOperation(value = "积分统计", response = ComActIntegralUserVO.class)
+ @ApiImplicitParam(name = "communityId", value = "社区id")
+ @GetMapping("/user/statistics")
+ public R getIntegralUserList(@RequestParam(value = "communityId", required = false) Long communityId) {
LoginUserInfoVO userInfoVO = this.getLoginUserInfo();
if (userInfoVO == null) {
return R.fail("请先登录");
}
- return communityService.getIntegralUserListApplets(userInfoVO.getUserId(), userInfoVO.getCommunityId());
+ return communityService.getIntegralUserListApplets(userInfoVO.getUserId(), communityId);
+ }
+
+ @ApiOperation(value = "查询我的积分余额", response = ComActIntegralUserVO.class)
+ @ApiImplicitParam(name = "communityId", value = "社区id", required = true)
+ @GetMapping("/user/balance")
+ public R getUserIntegralBalance(@RequestParam("communityId") Long communityId) {
+ LoginUserInfoVO userInfoVO = this.getLoginUserInfo();
+ if (userInfoVO == null) {
+ return R.fail("请先登录");
+ }
+ return communityService.getUserIntegralBalance(userInfoVO.getUserId(), communityId);
+ }
+
+ @ApiOperation(value = "获取积分详情", response = IntegralTradeVO.class)
+ @ApiImplicitParam(name = "id", value = "积分明细id", required = true)
+ @GetMapping("/user/detail")
+ public R getUserIntegralDetail(@RequestParam("id") Long id) {
+ return communityService.getUserIntegralDetail(id);
}
@ApiOperation(value = "查询社区积分排行榜", response = ComActIntegralCommunityRankVO.class)
@@ -59,9 +80,6 @@
LoginUserInfoVO userInfoVO = this.getLoginUserInfo();
if (userInfoVO == null) {
return R.fail("请先登录");
- }
- if (communityRankDTO.getCommunityId() == null) {
- communityRankDTO.setCommunityId(userInfoVO.getCommunityId());
}
return communityService.getIntegralCommunityRankApplets(communityRankDTO);
}
@@ -73,7 +91,6 @@
if (userInfoVO == null) {
return R.fail("请先登录");
}
- communityTradeDTO.setCommunityId(userInfoVO.getCommunityId());
communityTradeDTO.setUserId(userInfoVO.getUserId());
return communityService.getIntegralCommunityTradeApplets(communityTradeDTO);
}
--
Gitblit v1.7.1