From a830a73fd10a21e3793c79a35be4e532de124c6f Mon Sep 17 00:00:00 2001
From: nickchange <126672920+nickchange@users.noreply.github.com>
Date: 星期二, 17 十月 2023 17:25:16 +0800
Subject: [PATCH] 10.17.1

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

diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/BallController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/BallController.java
index b11550b..71585a9 100644
--- a/cloud-server-other/src/main/java/com/dsh/other/controller/BallController.java
+++ b/cloud-server-other/src/main/java/com/dsh/other/controller/BallController.java
@@ -7,10 +7,13 @@
 import com.dsh.other.model.BannerVo;
 import com.dsh.other.service.GameService;
 import com.dsh.other.service.IBannerService;
+import com.dsh.other.service.IRegionService;
+import com.dsh.other.service.TGameConfigService;
 import com.dsh.other.util.ResultUtil;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
+import io.swagger.models.auth.In;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -18,6 +21,7 @@
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author zhibing.pu
@@ -36,6 +40,56 @@
         return games;
     }
 
+    @Autowired
+    private IRegionService regionService;
+
+    @ResponseBody
+    @PostMapping("/save")
+    public Integer save(@RequestBody Game game){
+
+
+        if (game.getCityCode()!=null) {
+            Region city = regionService.getOne(new QueryWrapper<Region>().eq("code", game.getCityCode()));
+            game.setCity(city.getName());
+
+
+            Region province = regionService.getOne(new QueryWrapper<Region>().eq("code", game.getProvinceCode()));
+            game.setProvince(province.getName());
+
+        }
+
+
+        gameService.saveOrUpdate(game);
+         System.out.println("==========="+game);
+         return  game.getId();
+    }
+    @Autowired
+    private TGameConfigService config;
+
+
+    @ResponseBody
+    @PostMapping("/saveConfig")
+    public void saveConfig(@RequestBody List<TGameConfig> gameConfigList){
+        System.out.println("=======gameConfigList===="+gameConfigList);
+        config.saveOrUpdateBatch(gameConfigList);
+//        return  game.getId();
+    }
+
+    @ResponseBody
+    @PostMapping("/queryGame")
+    public Game queryGame(@RequestParam Integer id){
+       return gameService.getById(id);
+//        return  game.getId();
+    }
+
+    @ResponseBody
+    @PostMapping("/listorder")
+    public List<Map<String, Object>>  listorder(@RequestBody BookingQuery bookingQuery){
+        System.out.println("===bookingQuery===="+bookingQuery);
+        return gameService.orderlist(bookingQuery);
+//        return  game.getId();
+    }
+
 
 
 

--
Gitblit v1.7.1