CityLandService.java 541 B

12345678910111213141516171819
  1. package com.sysu.admin.controller.geo;
  2. import com.xiesx.fastboot.core.jpa.annotation.TargetDataSource;
  3. import com.xiesx.fastboot.core.jpa.cfg.DataSourceEnum;
  4. import org.springframework.beans.factory.annotation.Autowired;
  5. import org.springframework.stereotype.Service;
  6. @Service
  7. public class CityLandService {
  8. @Autowired
  9. CityLandRepository cityLandRepository;
  10. public CityLand findByPoint(double x, double y){
  11. CityLand cityLand = cityLandRepository.findIdByPoint("Point("+x+" "+y+")");
  12. return cityLand;
  13. }
  14. }