From 7808456a1e50af2dbd67488278eac85a558bd8f9 Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期日, 08 十月 2023 17:05:36 +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/BallController.java |   45 ++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 44 insertions(+), 1 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..9494de6 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,51 @@
         return games;
     }
 
+    @Autowired
+    private IRegionService regionService;
 
     @ResponseBody
     @PostMapping("/save")
-    public void save(@RequestBody Game game){
+    public Integer save(@RequestBody Game 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.save(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.saveBatch(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){
+        return gameService.orderlist(bookingQuery);
+//        return  game.getId();
     }
 
 

--
Gitblit v1.7.1