From a23f0ba99b7e3c1ad270dd5a263a6b48b4b8fb6f Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期四, 16 一月 2025 20:48:43 +0800 Subject: [PATCH] 修改bug --- ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AgentApplicationController.java | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-) diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AgentApplicationController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AgentApplicationController.java index 8483e72..53139d1 100644 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AgentApplicationController.java +++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AgentApplicationController.java @@ -1,5 +1,6 @@ package com.ruoyi.account.controller; import java.time.LocalDateTime; +import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -24,6 +25,7 @@ import com.ruoyi.other.api.feignClient.VipSettingClient; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; +import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -47,6 +49,10 @@ private BaseSettingClient baseSettingClient; @Resource private VipCenterService vipCenterService; + @Resource + private VipSettingClient vipSettingClient; + @Resource + private UserChangeLogService userChangeLogService; @PostMapping("/apply") @ApiOperation(value = "会员申请", tags = {"会员中心-小程序"}) @@ -59,28 +65,25 @@ @ApiOperation(value = "会员申请列表", tags = {"后台"}) public R<IPage<AgentApplication>> page(@RequestBody AgentQuery agentQuery) { IPage<AgentApplication> agentApplicationIPage = agentApplicationService.pageList(agentQuery); - for (AgentApplication record : agentApplicationIPage.getRecords()) { - AppUser byId = appUserService.getById(record.getAppUserId()); - if (byId!=null){ - record.setVipId(byId.getVipId()); - } - } return R.ok(agentApplicationIPage); } - @Resource - private VipSettingClient vipSettingClient; + @GetMapping("/detail") @ApiOperation(value = "会员申请详情", tags = {"会员中心-小程序"}) public R<AgentApplication> detail(@RequestParam Long id) { AgentApplication agentApplication = agentApplicationService.getById(id); + AppUser appUser = appUserService.getById(agentApplication.getAppUserId()); + agentApplication.setShopPoint(appUser.getShopPoint()); + agentApplication.setSharePoint(appUser.getSharePoint()); R<VipSetting> vipSetting = vipSettingClient.getVipSetting(agentApplication.getApplicationVipId()); VipSettingDto vipSettingDto = new VipSettingDto(); BeanUtils.copyProperties(vipSetting.getData(),vipSettingDto); agentApplication.setVipSettingDto(vipSettingDto); + agentApplication.setVipId(agentApplication.getApplicationVipId()); return R.ok(agentApplication); } - @Resource - private UserChangeLogService userChangeLogService; + + @GetMapping("/auth") @ApiOperation(value = "会员申请审核", tags = {"会员中心-小程序"}) -- Gitblit v1.7.1