| | |
| | | import com.xiaopeng.map.mapper.XpElectronicFenceMapper; |
| | | import com.xiaopeng.map.mapper.XpPointMapper; |
| | | import com.xiaopeng.map.mapper.XpRegionMapper; |
| | | import com.xiaopeng.map.event.FenceChangedEvent; |
| | | import com.xiaopeng.map.service.XpElectronicFenceAreaService; |
| | | import com.xiaopeng.map.service.XpElectronicFenceService; |
| | | import com.xiaopeng.map.service.XpPointService; |
| | |
| | | import org.locationtech.jts.geom.LinearRing; |
| | | import org.locationtech.jts.geom.Polygon; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.ApplicationEventPublisher; |
| | | import org.springframework.data.geo.Point; |
| | | import org.springframework.data.mongodb.core.MongoTemplate; |
| | | import org.springframework.data.mongodb.core.geo.GeoJsonPolygon; |
| | |
| | | private GDMapGeocodingUtil gdMapGeocodingUtil; |
| | | @Resource |
| | | private XpElectronicFenceAreaService xpElectronicFenceAreaService; |
| | | @Autowired |
| | | private ApplicationEventPublisher applicationEventPublisher; |
| | | |
| | | @Override |
| | | public PageInfo<XpElectronicFence> pageList(ElectronicPageListQuery query) { |
| | |
| | | } |
| | | } |
| | | } |
| | | // 发布围栏变更事件,事务提交后异步触发 ADC 推送 |
| | | applicationEventPublisher.publishEvent( |
| | | new FenceChangedEvent(this, xpElectronicFence.getId(), xpElectronicFence.getStatus())); |
| | | return R.ok(); |
| | | |
| | | } |