From c31f9914a85889bbe090d907ed53cc7a2fdcf8b6 Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期四, 28 十二月 2023 10:41:53 +0800 Subject: [PATCH] 11.27,9 --- cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/BallController.java | 60 ++++++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 38 insertions(+), 22 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 9fcfc58..b87153f 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 @@ -22,6 +22,7 @@ import com.dsh.course.service.TGameConfigService; import com.dsh.guns.config.UserExt; import com.dsh.guns.core.base.controller.BaseController; +import com.dsh.guns.core.util.ToolUtil; import com.dsh.guns.modular.system.controller.util.MD5; import com.dsh.guns.modular.system.model.*; import com.dsh.guns.modular.system.model.dto.*; @@ -272,26 +273,23 @@ // 添加门禁 红蓝方 TSite si = siteService.getById(site); TStore st = storeService.getById(store); - map3.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); - map3.put("space_id", si.getId() + ""); - map3.put("name", sutuName); - map3.put("city_code", ""); - String s3 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map3); - System.out.println("---------------------------"+s3); - JSONObject jsonObject = new JSONObject(s3); - // 获取 data 字段的值 - JSONObject dataObject = jsonObject.getJSONObject("data"); - // 获取 sutu_id 字段的值 - String sutuIdValue = dataObject.getString("sutu_id"); - Integer sutuId = Integer.valueOf(sutuIdValue); - game.setSutuId(sutuId); +// map3.put("sign", "0DB011836143EEE2C2E072967C9F4E4B"); +// map3.put("space_id", si.getId() + ""); +// map3.put("name", ToolUtil.isEmpty(sutuName) ? "" : sutuName); +// map3.put("city_code", ""); +// String s3 = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/addDevice", map3); +// System.out.println("---------------------------"+s3); +// JSONObject jsonObject = new JSONObject(s3); +// // 获取 data 字段的值 +// JSONObject dataObject = jsonObject.getJSONObject("data"); +// // 获取 sutu_id 字段的值 +// String sutuIdValue = dataObject.getString("sutu_id"); +// Integer sutuId = Integer.valueOf(sutuIdValue); +// game.setSutuId(sutuId); Integer gameId = ballClient.save(game); -List<TGameConfig> gameConfigList = new ArrayList<>(); + List<TGameConfig> gameConfigList = new ArrayList<>(); - - -//玩湃跨城赛 - + //玩湃跨城赛 TGameConfig gameConfigkuacheng = new TGameConfig(); gameConfigkuacheng.setId(kcId); gameConfigkuacheng.setGameId(kuachengId); @@ -303,7 +301,7 @@ gameConfigkuacheng.setOtherId(gameId); System.out.println("========gameConfig======"+gameConfigkuacheng); gameConfigList.add(gameConfigkuacheng); -System.out.println("======gameConfigList======="+gameConfigList); + System.out.println("======gameConfigList======="+gameConfigList); //社区冠军赛 @@ -899,19 +897,37 @@ @RequestMapping("/bypac") @ResponseBody public List<Map<String, Object>>bypac(@RequestBody PacQueryDto pacQueryDto) { - System.out.println("========ballQueryDto======"+pacQueryDto); if (pacQueryDto.getTimes()!=null&& pacQueryDto.getTimes()!=""){ String[] split = pacQueryDto.getTimes().split(","); pacQueryDto.setStart(split[0]); pacQueryDto.setEnd(split[1]); } if (UserExt.getUser().getObjectType() == 2){ - List<Integer> storeIds = storeService.list(new QueryWrapper<TStore>().eq("operatorId", UserExt.getUser().getObjectId())) + QueryWrapper<TStore> queryWrapper = new QueryWrapper<TStore>().eq("operatorId", UserExt.getUser().getObjectId()).eq("state", 1); + if(ToolUtil.isNotEmpty(pacQueryDto.getCityCode())){ + queryWrapper.eq("cityCode", pacQueryDto.getCityCode()); + } + if(ToolUtil.isNotEmpty(pacQueryDto.getName())){ + queryWrapper.like("name", pacQueryDto.getName()); + } + List<Integer> storeIds = storeService.list(queryWrapper) .stream().map(TStore::getId).collect(Collectors.toList()); + storeIds.add(-1); + pacQueryDto.setStoreIds(storeIds); + }else{ + QueryWrapper<TStore> queryWrapper = new QueryWrapper<TStore>().eq("state", 1); + if(ToolUtil.isNotEmpty(pacQueryDto.getCityCode())){ + queryWrapper.eq("cityCode", pacQueryDto.getCityCode()); + } + if(ToolUtil.isNotEmpty(pacQueryDto.getName())){ + queryWrapper.like("name", pacQueryDto.getName()); + } + List<Integer> storeIds = storeService.list(queryWrapper) + .stream().map(TStore::getId).collect(Collectors.toList()); + storeIds.add(-1); pacQueryDto.setStoreIds(storeIds); } List<Map<String, Object>> pays = coursePackageClient.bypac(pacQueryDto); - System.out.println("=========getStudentTotal======="+pays); return pays; } -- Gitblit v1.7.1