| | |
| | | package com.stylefeng.guns.modular.api; |
| | | |
| | | |
| | | import com.stylefeng.guns.modular.system.model.City; |
| | | import com.stylefeng.guns.modular.system.service.IOpenCityBusinessService; |
| | | import com.stylefeng.guns.modular.system.service.IOpenCityService; |
| | | import com.stylefeng.guns.modular.system.service.IUserInfoService; |
| | |
| | | }) |
| | | public ResultUtil openCity(Double lat, Double lnt, Integer language){ |
| | | try { |
| | | String s = openCityService.openCity(lat, lnt, language); |
| | | City city = openCityService.openCity(lat, lnt, language); |
| | | if(null == city){ |
| | | return ResultUtil.error(""); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("name", s); |
| | | map.put("name", language == 1 ? city.getChineseName() : language == 2 ? city.getEnglishName() : city.getFrenchName()); |
| | | map.put("content", language == 1 ? city.getCountryChineseName() : language == 2 ? city.getCountryEnglishName() : city.getCountryFrenchName()); |
| | | return ResultUtil.success(map); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |