From 9486766c806fe1d9e082b2fd02ea1cc558f1b443 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期四, 08 五月 2025 09:21:57 +0800 Subject: [PATCH] bug修改 --- cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/GameDataController.java | 30 ++++++++++++++++++++---------- 1 files changed, 20 insertions(+), 10 deletions(-) diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/GameDataController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/GameDataController.java index 4162750..a980951 100644 --- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/GameDataController.java +++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/GameDataController.java @@ -2,6 +2,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.dsh.course.feignClient.other.model.Site; +import com.dsh.guns.config.UserExt; import com.dsh.guns.core.base.controller.BaseController; import com.dsh.guns.modular.system.model.*; import com.dsh.guns.modular.system.service.ISiteBookingService; @@ -67,7 +68,7 @@ if(cityCode==null){ cityCode=""; } - String apiUrl1 = "https://try.daowepark.com/v7/user_api/general/cityGameRanking?space_id="+spaceId+"&type="+type+"&date="+date+"&city_code="+cityCode; + String apiUrl1 = "https://port.daowepark.com/v7/user_api/general/cityGameRanking?space_id="+spaceId+"&type="+type+"&date="+date+"&city_code="+cityCode; URL url1 = null; try { url1 = new URL(apiUrl1); @@ -118,8 +119,8 @@ if(cityCode==null){ cityCode=""; } -// String apiUrl1 = "https://try.daowepark.com/v7/user_api/general/accuracyGameRanking?space_id=1001"+spaceId+"&type="+type+"&date="+date+"&city_code="+cityCode; - String apiUrl1 = "https://try.daowepark.com/v7/user_api/general/accuracyGameRanking?space_id="+spaceId+"&type="+type+"&date="+date+"&city_code="+cityCode; +// String apiUrl1 = "https://port.daowepark.com/v7/user_api/general/accuracyGameRanking?space_id=1001"+spaceId+"&type="+type+"&date="+date+"&city_code="+cityCode; + String apiUrl1 = "https://port.daowepark.com/v7/user_api/general/accuracyGameRanking?space_id="+spaceId+"&type="+type+"&date="+date+"&city_code="+cityCode; URL url1 = null; try { url1 = new URL(apiUrl1); @@ -164,7 +165,7 @@ // 创建 HttpClient 实例 HttpClient httpClient = HttpClients.createDefault(); // 创建 POST 请求 - HttpPost httpPost = new HttpPost("https://try.daowepark.com/v7/user_api/general/gameList"); + HttpPost httpPost = new HttpPost("https://port.daowepark.com/v7/user_api/general/gameList"); // 设置请求体数据 String postData = "sign=0DB011836143EEE2C2E072967C9F4E4B&space_id=1001&sutu_id=1001"; @@ -194,9 +195,18 @@ } } List<TStore> stores = storeService.list(new QueryWrapper<TStore>()); - model.addAttribute("list", result); model.addAttribute("stores", stores); + model.addAttribute("list", result); model.addAttribute("sites", list); + if(UserExt.getUser().getObjectType() == 2){ + List<TStore> operatorId = storeService.list(new QueryWrapper<TStore>() + .eq("operatorId", UserExt.getUser().getObjectId())); + model.addAttribute("stores", operatorId); + List<TSite> sites = siteService.list(new QueryWrapper<TSite>() + .eq("operatorId", UserExt.getUser().getObjectId())); + model.addAttribute("sites", sites); + } + return PREFIX + "GameData.html"; } @@ -212,7 +222,7 @@ // 创建 HttpClient 实例 HttpClient httpClient = HttpClients.createDefault(); // 创建 POST 请求 - HttpPost httpPost = new HttpPost("https://try.daowepark.com/v7/user_api/general/getBatterData"); + HttpPost httpPost = new HttpPost("https://port.daowepark.com/v7/user_api/general/getBatterData"); // 设置请求体数据 String postData = "sign=0DB011836143EEE2C2E072967C9F4E4B&space_id="+storeId+"&date_type="+range+"&year="; @@ -253,7 +263,7 @@ public Object listSUTU() { Map<String, Object> result = new HashMap<>(); try { - String apiUrl = "https://try.daowepark.com/v7/user_api/general/gameDataRate"; + String apiUrl = "https://port.daowepark.com/v7/user_api/general/gameDataRate"; URL url = new URL(apiUrl); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); @@ -299,7 +309,7 @@ public Object listSUTU1(String range,String gameId, String time, String spaceId, String cityCode) { Map<String, Object> result = new HashMap<>(); try { - String apiUrl = "https://try.daowepark.com/v7/user_api/general/getSingleGameData?game_id=" + gameId + "&date_type=" + range + "&date=" + time + "&space_id=" + spaceId + "&city_code=" + cityCode; + String apiUrl = "https://port.daowepark.com/v7/user_api/general/getSingleGameData?game_id=" + gameId + "&date_type=" + range + "&date=" + time + "&space_id=" + spaceId + "&city_code=" + cityCode; URL url = new URL(apiUrl); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); @@ -347,7 +357,7 @@ public Object cityGameOne() { Map<String, Object> result = new HashMap<>(); try { - String apiUrl = "https://try.daowepark.com/v7/user_api/general/getAccuracyGameCount?space_id="; + String apiUrl = "https://port.daowepark.com/v7/user_api/general/getAccuracyGameCount?space_id="; URL url = new URL(apiUrl); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); @@ -384,7 +394,7 @@ public Object cityGame() { Map<String, Object> result = new HashMap<>(); try { - String apiUrl = "https://try.daowepark.com/v7/user_api/general/getCityGameCount"; + String apiUrl = "https://port.daowepark.com/v7/user_api/general/getCityGameCount"; URL url = new URL(apiUrl); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); -- Gitblit v1.7.1