| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.integral.ComActIntegralCommunityRankDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.AddComActIntegralUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.EditComActIntegralRuleDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.PageComActIntegralRuleDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.PageComActIntegralTradeDTO; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.AddComActIntegralUserDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.service.ComActIntegralRuleService; |
| | | import com.panzhihua.service_community.service.ComActIntegralUserService; |
| | | import com.panzhihua.service_community.service.ComActIntegralUserTradeService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * 用户积分模块 |
| | |
| | | |
| | | /** |
| | | * 小程序-查询积分说明 |
| | | * @return 积分说明 |
| | | * |
| | | * @return 积分说明 |
| | | */ |
| | | @GetMapping("/explain/applets") |
| | | public R getIntegralExplainApplets(){ |
| | | public R getIntegralExplainApplets() { |
| | | return comActIntegralUserService.getIntegralExplainApplets(); |
| | | } |
| | | |
| | | /** |
| | | * 用户查询当前社区可领取积分规则列表 |
| | | * @param userId 用户id |
| | | * @param communityId 社区id |
| | | * @return 可领取积分规则列表 |
| | | * |
| | | * @param userId |
| | | * 用户id |
| | | * @param communityId |
| | | * 社区id |
| | | * @return 可领取积分规则列表 |
| | | */ |
| | | @PostMapping("/receive/applets") |
| | | public R getIntegralReceiveApplets(@RequestParam("userId") Long userId, @RequestParam("communityId") Long communityId){ |
| | | return comActIntegralUserService.getIntegralReceiveApplets(userId,communityId); |
| | | public R getIntegralReceiveApplets(@RequestParam("userId") Long userId, |
| | | @RequestParam("communityId") Long communityId) { |
| | | return comActIntegralUserService.getIntegralReceiveApplets(userId, communityId); |
| | | } |
| | | |
| | | /** |
| | | * 小程序-查询用户积分列表 |
| | | * @param userId 用户id |
| | | * @return 用户积分列表 |
| | | * |
| | | * @param userId |
| | | * 用户id |
| | | * @return 用户积分列表 |
| | | */ |
| | | @PostMapping("/user/list/applets") |
| | | public R getIntegralUserListApplets(@RequestParam("userId") Long userId, @RequestParam("communityId") Long communityId){ |
| | | return comActIntegralUserService.getIntegralUserListApplets(userId,communityId); |
| | | public R getIntegralUserListApplets(@RequestParam("userId") Long userId, |
| | | @RequestParam("communityId") Long communityId) { |
| | | return comActIntegralUserService.getIntegralUserListApplets(userId, communityId); |
| | | } |
| | | |
| | | /** |
| | | * 查询社区积分账户排行榜 |
| | | * @param communityRankDTO 请求参数 |
| | | * @return 社区积分账户排行榜 |
| | | * |
| | | * @param communityRankDTO |
| | | * 请求参数 |
| | | * @return 社区积分账户排行榜 |
| | | */ |
| | | @PostMapping("/community/rank/applets") |
| | | public R getIntegralCommunityRankApplets(@RequestBody ComActIntegralCommunityRankDTO communityRankDTO){ |
| | | public R getIntegralCommunityRankApplets(@RequestBody ComActIntegralCommunityRankDTO communityRankDTO) { |
| | | return comActIntegralUserService.getIntegralCommunityRankApplets(communityRankDTO); |
| | | } |
| | | |
| | | /** |
| | | * 小程序-查询用户社区积分明细 |
| | | * @param communityTradeDTO 请求参数 |
| | | * @return 用户社区积分明细 |
| | | * |
| | | * @param communityTradeDTO |
| | | * 请求参数 |
| | | * @return 用户社区积分明细 |
| | | */ |
| | | @PostMapping("/community/trade/applets") |
| | | public R getIntegralCommunityTradeApplets(@RequestBody ComActIntegralCommunityRankDTO communityTradeDTO){ |
| | | public R getIntegralCommunityTradeApplets(@RequestBody ComActIntegralCommunityRankDTO communityTradeDTO) { |
| | | return comActIntegralUserTradeService.getIntegralCommunityTradeApplets(communityTradeDTO); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-根据社区id查询社区下积分规则列表 |
| | | * @param integralRuleDTO 请求参数 |
| | | * @return 社区下积分规则列表 |
| | | * |
| | | * @param integralRuleDTO |
| | | * 请求参数 |
| | | * @return 社区下积分规则列表 |
| | | */ |
| | | @PostMapping("/rule/list/admin") |
| | | public R getIntegralRuleAdminList(@RequestBody PageComActIntegralRuleDTO integralRuleDTO){ |
| | | public R getIntegralRuleAdminList(@RequestBody PageComActIntegralRuleDTO integralRuleDTO) { |
| | | return comActIntegralRuleService.getIntegralRuleAdminList(integralRuleDTO); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-编辑社区积分规则 |
| | | * @param integralRuleDTO 请求参数 |
| | | * @return 编辑结果 |
| | | * |
| | | * @param integralRuleDTO |
| | | * 请求参数 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PostMapping("/rule/edit/admin") |
| | | public R editIntegralRuleAdmin(@RequestBody EditComActIntegralRuleDTO integralRuleDTO){ |
| | | public R editIntegralRuleAdmin(@RequestBody EditComActIntegralRuleDTO integralRuleDTO) { |
| | | return comActIntegralRuleService.editIntegralRuleAdmin(integralRuleDTO); |
| | | } |
| | | |
| | | /** |
| | | * 社区后台-分页查询社区下积分明细记录 |
| | | * @param integralRuleDTO 请求参数 |
| | | * @return 社区下积分明细记录 |
| | | * |
| | | * @param integralRuleDTO |
| | | * 请求参数 |
| | | * @return 社区下积分明细记录 |
| | | */ |
| | | @PostMapping("/user/trade/page/admin") |
| | | public R getIntegralTradeListAdmin(@RequestBody PageComActIntegralTradeDTO integralRuleDTO){ |
| | | public R getIntegralTradeListAdmin(@RequestBody PageComActIntegralTradeDTO integralRuleDTO) { |
| | | return comActIntegralUserTradeService.getIntegralTradeListAdmin(integralRuleDTO); |
| | | } |
| | | |
| | | /** |
| | | * 给用户添加积分 |
| | | * @param integralUserDTO 请求参数 |
| | | * @return 添加积分结果 |
| | | * |
| | | * @param integralUserDTO |
| | | * 请求参数 |
| | | * @return 添加积分结果 |
| | | */ |
| | | @PostMapping("/user/add/admin") |
| | | public R addIntegralTradeAdmin(@RequestBody AddComActIntegralUserDTO integralUserDTO){ |
| | | public R addIntegralTradeAdmin(@RequestBody AddComActIntegralUserDTO integralUserDTO) { |
| | | return comActIntegralUserTradeService.addIntegralTradeAdmin(integralUserDTO); |
| | | } |
| | | |
| | | /** |
| | | * 根据社区活动id查询社区活动报名人员列表 |
| | | * @param activityId 活动id |
| | | * @return 社区活动报名人员列表 |
| | | * |
| | | * @param activityId |
| | | * 活动id |
| | | * @return 社区活动报名人员列表 |
| | | */ |
| | | @PostMapping("/act/activity/admin") |
| | | public R getTaskActivityPeopleList(@RequestParam("activityId") Long activityId){ |
| | | public R getTaskActivityPeopleList(@RequestParam("activityId") Long activityId) { |
| | | return comActIntegralUserService.getTaskActivityPeopleList(activityId); |
| | | } |
| | | |