| | |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IRegionService; |
| | | import com.dsh.guns.modular.system.service.TOperatorService; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.common.collect.Lists; |
| | | import com.google.maps.internal.ApiResponse; |
| | | import groovyjarjarpicocli.CommandLine; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | |
| | | @Autowired |
| | | private SiteClient siteClient; |
| | | private String PREFIX = "/system/gateData/"; |
| | | |
| | | @Autowired |
| | | private TOperatorService operatorService; |
| | | /** |
| | | * 跳转到充值记录页面 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | List<TOperator> list = operatorService.list(new QueryWrapper<TOperator>().ne("state", 3)); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "GateData.html"; |
| | | } |
| | | /** |
| | |
| | | */ |
| | | @RequestMapping("/list") |
| | | @ResponseBody |
| | | public Object list() { |
| | | public Object list(Integer storeId) { |
| | | try { |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/spaceDoorData?space_id=1001"; |
| | | if (storeId!=null){ |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/spaceDoorData?space_id="+storeId; |
| | | URL url = new URL(apiUrl); |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestMethod("GET"); |
| | |
| | | } else { |
| | | System.out.println("请求失败: " + responseCode); |
| | | } |
| | | } |
| | | |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | */ |
| | | @RequestMapping("/totalNum") |
| | | @ResponseBody |
| | | public Object totalNum() { |
| | | public Object totalNum(Integer storeId) { |
| | | try { |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/spaceDoorData?space_id=1001"; |
| | | String apiUrl = "https://try.daowepark.com/v7/user_api/general/spaceDoorData?space_id="+storeId; |
| | | URL url = new URL(apiUrl); |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestMethod("GET"); |