From 9e8ce689c89c4b03bfc67a60d7da13a7d593725a Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期二, 24 十月 2023 20:33:41 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai

---
 cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java |   57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 54 insertions(+), 3 deletions(-)

diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java
index 8fcd7e0..46a38e2 100644
--- a/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java
+++ b/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java
@@ -19,6 +19,7 @@
 import com.dsh.other.model.vo.siteVo.SiteSearchVO;
 import com.dsh.other.service.*;
 import com.dsh.other.util.PayMoneyUtil;
+import com.dsh.other.util.RedisUtil;
 import com.dsh.other.util.ResultUtil;
 import com.dsh.other.util.TokenUtil;
 import io.swagger.annotations.ApiImplicitParam;
@@ -27,6 +28,7 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.web.bind.annotation.*;
+import redis.clients.jedis.Jedis;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -197,7 +199,8 @@
         }
     }
 
-
+    @Autowired
+    private RedisUtil redisUtil;
 
     @ResponseBody
     @PostMapping("/base/site/querySiteTimes")
@@ -205,8 +208,8 @@
     @ApiImplicitParams({
             @ApiImplicitParam(value = "场地id", name = "id", dataType = "int", required = true),
             @ApiImplicitParam(value = "日期(2023-01-01)", name = "day", dataType = "string", required = true),
-            @ApiImplicitParam(value = "选择场地的名称", name = "day", dataType = "string", required = true),
-            @ApiImplicitParam(value = "半场名称", name = "day", dataType = "string", required = false)
+            @ApiImplicitParam(value = "半场名称", name = "halfName", dataType = "string", required = false),
+            @ApiImplicitParam(value = "选择场地的名称", name = "siteName", dataType = "string", required = false)
     })
     public ResultUtil<List<QuerySiteTimes>> querySiteTimes(Integer id, String day,String halfName,String siteName){
         try {
@@ -217,6 +220,22 @@
             return ResultUtil.runErr();
         }
     }
+
+//    public ResultUtil<List<QuerySiteTimes>> querySiteTimes(Integer id, String day, String halfName, String siteName) throws Exception {
+//
+//        if (redisUtil.acquireLock(day,day)) {
+//            try {
+//                List<QuerySiteTimes> list = siteService.querySiteTimes(id, day,halfName,siteName);
+//            return ResultUtil.success(list);
+//            } finally {
+//                redisUtil.releaseLock(day);
+//            }
+//        } else {
+//            return ResultUtil.error("系统繁忙,请稍后再试!");
+//        }
+//
+//    }
+
 
 
     /**
@@ -255,6 +274,22 @@
             return ResultUtil.runErr();
         }
     }
+
+//        public ResultUtil<List<QuerySiteTimes>> querySiteTimes(Integer id, String day, String halfName, String siteName) throws Exception {
+//
+//        if (redisUtil.acquireLock(day,day)) {
+//            try {
+//                List<QuerySiteTimes> list = siteService.querySiteTimes(id, day,halfName,siteName);
+//            return ResultUtil.success(list);
+//            } finally {
+//                redisUtil.releaseLock(day);
+//            }
+//        } else {
+//            return ResultUtil.error("系统繁忙,请稍后再试!");
+//        }
+//
+//    }
+
 
     /**
      * 购买课程微信支付回调
@@ -356,6 +391,14 @@
             SiteBooking byId = siteBookingService.getById(id);
             Integer storeId = byId.getStoreId();
             Store byId1 = service.getById(storeId);
+            Site site = siteService.getById(byId.getSiteId());
+
+            map.put("siteName",byId1.getName());
+            SiteType siteType = siteTypeService.getById(site.getSiteTypeId());
+            map.put("siteType",siteType.getName());
+            map.put("shopName",byId1.getName());
+            map.put("shopAddress",byId1.getAddress());
+
 
             List<Integer> ids = getIds(byId.getSiteId());
             byId.setStorePhone(byId1.getPhone());
@@ -536,6 +579,14 @@
     @Autowired
     private IOperatorUserService operatorUserService;
 
+
+    @ResponseBody
+    @PostMapping("/base/site/game")
+    public List<Map<String, Object>> game(@RequestBody Integer appUserId){
+        return service.game(appUserId);
+
+    }
+
     @ResponseBody
     @PostMapping("/base/site/queryOperator")
     public OperatorUser queryOperator(@RequestBody List<Integer> stores){

--
Gitblit v1.7.1