From 7b487d4c819bc67021cf224c5042066bf73df1e3 Mon Sep 17 00:00:00 2001
From: nickchange <126672920+nickchange@users.noreply.github.com>
Date: 星期六, 28 十月 2023 17:01:00 +0800
Subject: [PATCH] 10.28。2
---
cloud-server-other/src/main/java/com/dsh/other/controller/BallController.java | 50 ++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 48 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..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,12 +40,54 @@
return games;
}
+ @Autowired
+ private IRegionService regionService;
@ResponseBody
@PostMapping("/save")
- public void save(@RequestBody Game game){
+ public Integer save(@RequestBody Game game){
- gameService.save(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