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-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java | 128 +++++++++++++++++++++++++++++++++++++----- 1 files changed, 112 insertions(+), 16 deletions(-) diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java index 6c7ba02..27eae7f 100644 --- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java +++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java @@ -14,6 +14,7 @@ import com.dsh.course.feignClient.course.CoursePackageDiscountClient; import com.dsh.course.feignClient.course.CoursePackagePaymentConfigClient; import com.dsh.course.feignClient.course.CoursePackageTypeClient; +import com.dsh.course.feignClient.course.model.TCoursePackage; import com.dsh.course.feignClient.course.model.TCoursePackageType; import com.dsh.course.feignClient.other.BallClient; import com.dsh.course.feignClient.other.SiteClient; @@ -40,10 +41,7 @@ import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.util.Base64Utils; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.io.BufferedReader; @@ -184,9 +182,23 @@ @ResponseBody public List<Game> changelist(BallQueryDto ballQueryDto) { System.out.println("=======ballQueryDto=========="+ballQueryDto); - + User user = UserExt.getUser(); + ballQueryDto.setType(user.getObjectType()); + ballQueryDto.setId(user.getObjectId()); return ballClient.list(ballQueryDto); } + + @ResponseBody + @PostMapping("/editCoursePackageState") + public ResultUtil editCoursePackageState(Integer id, Integer state){ + Game game = new Game(); + game.setId(id); + game.setState(state); + ballClient.save(game); + + return ResultUtil.success(); + } + @RequestMapping("/save") @ResponseBody @@ -202,14 +214,11 @@ , String zs2, BigDecimal zs2Coin, BigDecimal zs2Cash, String zs2Image, BigDecimal zs2Int, Integer zs2Id,Integer zs2IId , String ly, BigDecimal lyCoin, BigDecimal lyCash, String lyImage, BigDecimal lyInt, Integer lyId,Integer lyIId - - - - ) { Game game = new Game(); game.setRed(red); + game.setState(0); game.setBlue(blue); game.setProvinceCode(province); game.setCityCode(city); @@ -368,7 +377,27 @@ @RequestMapping("/pre_add") public String add(Model model) { + Integer objectType = UserExt.getUser().getObjectType(); + + if (objectType ==3){ + + model.addAttribute("is3","true"); + model.addAttribute("storeId",UserExt.getUser().getObjectId()); + TStore byId = storeService.getById(UserExt.getUser().getObjectId()); + model.addAttribute("cityCode",byId.getCityCode()); + model.addAttribute("provinceCode",byId.getProvinceCode()); + model.addAttribute("oId",byId.getOperatorId()); + return PREFIX+"ball_pre_add1.html"; + + }else { + model.addAttribute("is3","false"); + } + + + model.addAttribute("is","${is}"); + + return PREFIX+"ball_pre_add.html"; } @@ -384,6 +413,77 @@ System.out.println("---------game------"+game); model.addAttribute("game",game); + if (game.getOperationId() ==0){ + model.addAttribute("opId","平台"); + model.addAttribute("is","平台"); + }else { + model.addAttribute("opId",game.getOperationId()); + } + + TGameConfig kc = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 14)); + model.addAttribute("kc",kc); + + + TGameConfig sq = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 16)); + model.addAttribute("sq",sq); + + + TGameConfig sm = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 13)); + model.addAttribute("sm",sm); + + TGameConfig sd = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 15)); + model.addAttribute("sd",sd); + + TGameConfig fk = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 1)); + model.addAttribute("fk",fk); + + TGameConfig jx = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 7)); + model.addAttribute("jx",jx); + + TGameConfig qw = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 8)); + model.addAttribute("qw",qw); + + TGameConfig zs = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 10)); + model.addAttribute("zs",zs); + + TGameConfig zs2 = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 11)); + model.addAttribute("zs2",zs2); + + TGameConfig ly = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 5)); + model.addAttribute("ly",ly); + + + Integer objectType = UserExt.getUser().getObjectType(); + + if (objectType ==3){ + model.addAttribute("is3","true"); + model.addAttribute("storeId",UserExt.getUser().getObjectId()); + TStore byId = storeService.getById(UserExt.getUser().getObjectId()); + model.addAttribute("cityCode",byId.getCityCode()); + model.addAttribute("provinceCode",byId.getProvinceCode()); + model.addAttribute("oId",byId.getOperatorId()); + return PREFIX+"ball_pre_edit1.html"; + + } + + return PREFIX+"ball_pre_edit.html"; + } + + + @RequestMapping("/pre_info/{id}") + public String pre_info(@PathVariable("id") Integer id,Model model) { + + Game game = ballClient.queryGame(id); + System.out.println("---------game------"+game); + model.addAttribute("game",game); + + + if (game.getOperationId() ==0){ + model.addAttribute("opId","平台"); + model.addAttribute("is","平台"); + }else { + model.addAttribute("opId",game.getOperationId()); + } TGameConfig kc = gameConfigService.getOne(new QueryWrapper<TGameConfig>().eq("otherId", id).eq("gameId", 14)); model.addAttribute("kc",kc); @@ -419,7 +519,7 @@ - return PREFIX+"ball_pre_edit.html"; + return PREFIX+"ball_pre_info.html"; } @Autowired @@ -463,8 +563,6 @@ List<OrderDto> timeRanges = new ArrayList<>(); - - Site site = siteClient.listById(book.getSiteId()); System.out.println("================"+site); String appointmentStartTime = site.getAppointmentStartTime(); @@ -503,9 +601,6 @@ if (strings1.contains(timeRange)){ orderDto.setState(1); } - - - timeRanges.add(orderDto); currentTime = nextTime; @@ -769,9 +864,10 @@ @RequestMapping("/addjs") @ResponseBody - public void addjs( @RequestBody JsDto jsDto) { + public ResultUtil addjs( @RequestBody JsDto jsDto) { System.out.println("=======jsDto========"+jsDto); storeService.insert(jsDto); + return new ResultUtil(0,0,"保存成功",null,null); } -- Gitblit v1.7.1