| | |
| | | public R getNearByGrid(PageEventGridNearbyDTO pageEventGridNearbyDTO) { |
| | | Page page = new Page(pageEventGridNearbyDTO.getPageNum(), pageEventGridNearbyDTO.getPageSize()); |
| | | String latLng = pageEventGridNearbyDTO.getHappentLatLng(); |
| | | if(!latLng.matches("^[\\-\\+]?(0(\\.\\d{1,10})?|([1-9](\\d)?)(\\.\\d{1,10})?|1[0-7]\\d{1}(\\.\\d{1,10})?|180\\.0{1,10}),[\\-\\+]?((0|([1-8]\\d?))(\\.\\d{1,10})?|90(\\.0{1,10})?)$")){ |
| | | // if(!latLng.matches("^[\\-\\+]?(0(\\.\\d{1,10})?|([1-9](\\d)?)(\\.\\d{1,10})?|1[0-7]\\d{1}(\\.\\d{1,10})?|180\\.0{1,10}),[\\-\\+]?((0|([1-8]\\d?))(\\.\\d{1,10})?|90(\\.0{1,10})?)$")){ |
| | | // return R.fail("经纬度参数错误"); |
| | | // } |
| | | if(!latLng.matches("[1-9][0-9](\\.[0-9]{1,6})?,[1-9][0-9]{2}(\\.[0-9]{1,6})?")){ |
| | | return R.fail("经纬度参数错误"); |
| | | } |
| | | String latLngArr[] = latLng.split(","); |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | EventServiceImpl service = new EventServiceImpl(); |
| | | List<EventWorkVO> list = service.listHalfYearByDyn(); |
| | | System.out.println(list); |
| | | String content = "30,104"; |
| | | String re = "[1-9][0-9](\\.[0-9]{1,6})?,[1-9][0-9]{2}(\\.[0-9]{1,6})?"; |
| | | |
| | | System.out.println(content.matches(re)); |
| | | } |
| | | |
| | | } |