| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | @Api(tags = "企业控制器") |
| | | @RestController |
| | | @RequestMapping("/ent") |
| | | @SuppressWarnings("ALL") |
| | | public class EntController extends BaseController { |
| | | @Resource |
| | | EntService entService; |
| | |
| | | if (null == pageIndex || pageIndex < 1) { |
| | | pageIndex = 1; |
| | | } |
| | | int count = qiYeMapper.selectCount(); |
| | | List<EntEntity> list = qiYeMapper.selectByPage(pageSize, StaticData.I100 * (pageIndex - 1)); |
| | | |
| | | return success(null == list || list.isEmpty() ? 0 : list.size(), list); |
| | | return success(count, list); |
| | | } catch (Exception ex) { |
| | | return fail(ex, -1); |
| | | } |
| | |
| | | } |
| | | |
| | | JSONObject object = jsonArray.getJSONObject(0); |
| | | String addr = object.getString("formatted_address"); |
| | | /*String addr = object.getString("formatted_address"); |
| | | if (StringHelper.isEmpty(addr)) { |
| | | return; |
| | | } |
| | |
| | | if (encoding != null) { |
| | | addr = new String(addr.getBytes(encoding)); |
| | | } |
| | | // ent.setAddress(addr) |
| | | ent.setAddress(addr);*/ |
| | | |
| | | String location = object.getString("location"); |
| | | String[] split = location.split(","); |
| | | ent.setX(Double.parseDouble(split[1])); |
| | | ent.setY(Double.parseDouble(split[0])); |
| | | ent.setX(Double.parseDouble(split[0])); |
| | | ent.setY(Double.parseDouble(split[1])); |
| | | } catch (Exception ex) { |
| | | log.error(ex.getMessage(), ex); |
| | | } |