From ee9cb0da4a43bcf523ebb157678f64a2895fba1a Mon Sep 17 00:00:00 2001
From: nickchange <126672920+nickchange@users.noreply.github.com>
Date: 星期二, 10 十月 2023 15:30:38 +0800
Subject: [PATCH] 10.10

---
 cloud-server-other/src/main/java/com/dsh/other/controller/BallController.java |   48 ++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 46 insertions(+), 2 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 4012ed7..08782b2 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,12 +40,52 @@
         return games;
     }
 
+    @Autowired
+    private IRegionService regionService;
 
     @ResponseBody
     @PostMapping("/save")
-    public void save(@RequestBody Game game){
+    public Integer save(@RequestBody Game game){
 
-        gameService.save(game);
+        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