From 0547707e29364a36df05c5afcddd37f30702421e Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期三, 13 三月 2024 14:31:58 +0800
Subject: [PATCH] bug修改

---
 cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java |   33 ++++++++++++++++++++++++++++++---
 1 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java b/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java
index ffb7485..1cbcdaf 100644
--- a/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java
+++ b/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java
@@ -26,6 +26,7 @@
 import io.swagger.annotations.ApiOperation;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -98,8 +99,19 @@
      */
     @ResponseBody
     @PostMapping("/worldCup/getWorldCupStoreListByStoreId")
-    public List<WorldCupStore> getWorldCupStoreListByStoreId(@RequestBody Integer storeId){
-        return worldCupStoreService.list(new QueryWrapper<WorldCupStore>().eq("storeId", storeId));
+    public List<WorldCupStoreVO> getWorldCupStoreListByStoreId(@RequestBody Integer storeId){
+        List<WorldCupStoreVO> res = new ArrayList<>();
+
+        List<WorldCupStore> storeId1 = worldCupStoreService.list(new QueryWrapper<WorldCupStore>().eq("storeId", storeId));
+        for (WorldCupStore worldCupStore : storeId1) {
+            WorldCupStoreVO worldCupStoreVO = new WorldCupStoreVO();
+            BeanUtils.copyProperties(worldCupStore,worldCupStoreVO);
+            // 查询世界杯活动名称
+            WorldCup byId = worldCupService.getById(worldCupStore.getWorldCupId());
+            worldCupStoreVO.setName(byId.getName());
+            res.add(worldCupStoreVO);
+        }
+        return res;
     }
     /**
      * 根据门店id修改门店关系数据
@@ -195,7 +207,7 @@
             Participant participant = participantClient.getParticipant(worldCupPaymentParticipant.getParticipantId());
             worldCupPeopleVo.setName(participant.getName());
             worldCupPeopleVo.setAge(null == participant.getBirthday() ? 0 : Integer.valueOf(sdf.format(new Date())) -Integer.valueOf(sdf.format(participant.getBirthday())));
-            worldCupPeopleVo.setAvatar(appUser.getHeadImg());
+            worldCupPeopleVo.setAvatar(participant.getHeadImg());
             worldCupPeopleVo.setParticipantType(2);
         }
         return ResultUtil.success(worldCupPeopleVo);
@@ -849,4 +861,19 @@
         }
         return worldCupPaymentParticipantService.getCount(worldCupId, collect);
     }
+
+
+    /**
+     * 获取支付记录
+     * @param getWorldCupPayment
+     * @return
+     */
+    @ResponseBody
+    @PostMapping("/worldCup/getWorldCupPayment")
+    public List<WorldCupPayment> getWorldCupPayment(@RequestBody GetWorldCupPayment getWorldCupPayment){
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        return worldCupPaymentService.list(new QueryWrapper<WorldCupPayment>().eq("appUserId", getWorldCupPayment.getAppUserId())
+                .eq("payType", getWorldCupPayment.getPayType()).ne("payStatus", 1).eq("state", 1)
+                .last(" and createTime between '" + sdf.format(getWorldCupPayment.getStartTime()) + "' and  '" + sdf.format(getWorldCupPayment.getEndTime()) + "' order by createTime desc"));
+    }
 }

--
Gitblit v1.7.1