From c77909ffc32e43ccde9e530cc746161a61f16b30 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期四, 21 三月 2024 14:45:00 +0800
Subject: [PATCH] Merge branch '2.0' of http://120.76.84.145:10101/gitblit/r/java/PlayPai into 2.0

---
 cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java |   42 ++++++++++++++++++++++++------------------
 1 files changed, 24 insertions(+), 18 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 d81900c..2efebb0 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
@@ -109,13 +109,17 @@
     @PostMapping("/worldCup/getWorldCupStoreListByStoreId")
     public List<WorldCupStoreVO> getWorldCupStoreListByStoreId(@RequestBody Integer storeId){
         List<WorldCupStoreVO> res = new ArrayList<>();
-
-        List<WorldCupStore> storeId1 = worldCupStoreService.list(new QueryWrapper<WorldCupStore>().eq("storeId", storeId));
+        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());
+            if (byId.getStatus()==3 || byId.getStatus()==4){
+                continue;
+            }
             worldCupStoreVO.setName(byId.getName());
             res.add(worldCupStoreVO);
         }
@@ -244,16 +248,16 @@
             return ResultUtil.error("二维码不正确");
         }
         Integer space_id = jsonObject.getInteger("space_id");
-        Store store = storeClient.queryStoreById(space_id);
-        if(null == store){
+        Site site = siteClient.getSite(space_id);
+        if(null == site){
             return ResultUtil.error("无法获取场地信息");
         }
+        Store store = storeClient.queryStoreById(site.getStoreId());
         String sutu_id = jsonObject.getString("sutu_id");
         TGame tGame = gameClient.getTGameBySutuId(sutu_id);
         if(null == tGame){
             return ResultUtil.error("无效的游戏二维码");
         }
-        Site site = siteClient.getSite(tGame.getSiteId());
         Map<String, String> map = new HashMap<>();
         map.put("name", store.getName());
         map.put("address", site.getName());
@@ -656,9 +660,10 @@
      */
     @ResponseBody
     @PostMapping("/worldCup/editWorldCup")
-    public Integer editWorldCup(@RequestBody WorldCup worldCup){
-        String lon = worldCup.getLon();
-        String lat = worldCup.getLat();
+    public Integer editWorldCup(@RequestBody String worldCup){
+        WorldCup worldCup2 = JSON.parseObject(worldCup, WorldCup.class);
+        String lon = worldCup2.getLon();
+        String lat = worldCup2.getLat();
         Map<String, String> geocode = null;
         try {
             geocode = gdMapGeocodingUtil.geocode(lon, lat);
@@ -669,15 +674,15 @@
         String provinceCode = geocode.get("provinceCode");
         String city = geocode.get("city");
         String cityCode = geocode.get("cityCode");
-        worldCup.setProvince(province.replace("省", ""));
-        worldCup.setProvinceCode(provinceCode);
-        worldCup.setCity(city.replace("市", ""));
-        worldCup.setCityCode(cityCode);
-        WorldCup worldCup1 = worldCupService.getById(worldCup.getId());
-        worldCup.setCreateTime(worldCup1.getCreateTime());
-        worldCup.setMatchNumber(worldCup1.getMatchNumber());
-        worldCupService.updateWorldCupAll(worldCup);
-        return worldCup.getId();
+        worldCup2.setProvince(province.replace("省", ""));
+        worldCup2.setProvinceCode(provinceCode);
+        worldCup2.setCity(city.replace("市", ""));
+        worldCup2.setCityCode(cityCode);
+        WorldCup worldCup1 = worldCupService.getById(worldCup2.getId());
+        worldCup2.setCreateTime(worldCup1.getCreateTime());
+        worldCup2.setMatchNumber(worldCup1.getMatchNumber());
+        worldCupService.updateWorldCupAll(worldCup2);
+        return worldCup2.getId();
     }
 
 
@@ -887,8 +892,9 @@
     public List<WorldCupPayment> getWorldCupPayment(@RequestBody GetWorldCupPayment getWorldCupPayment){
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         String payType = getWorldCupPayment.getPayType();
-        return worldCupPaymentService.list(new QueryWrapper<WorldCupPayment>().eq("appUserId", getWorldCupPayment.getAppUserId())
+        List<WorldCupPayment> list = worldCupPaymentService.list(new QueryWrapper<WorldCupPayment>().eq("appUserId", getWorldCupPayment.getAppUserId())
                 .in("payType", Arrays.asList(payType.split(","))).ne("payStatus", 1).eq("state", 1)
                 .last(" and createTime between '" + sdf.format(getWorldCupPayment.getStartTime()) + "' and  '" + sdf.format(getWorldCupPayment.getEndTime()) + "' order by createTime desc"));
+        return list;
     }
 }

--
Gitblit v1.7.1