From 410e261a251e07b17bba8aa9b098eb21c34de5cb Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 30 七月 2025 16:30:53 +0800 Subject: [PATCH] 添加证联集成 --- DriverQYTTravel/guns-admin/src/test/java/com/stylefeng/guns/GunsApplicationTest.java | 58 ++++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 36 insertions(+), 22 deletions(-) diff --git a/DriverQYTTravel/guns-admin/src/test/java/com/stylefeng/guns/GunsApplicationTest.java b/DriverQYTTravel/guns-admin/src/test/java/com/stylefeng/guns/GunsApplicationTest.java index 0251a97..49643d3 100644 --- a/DriverQYTTravel/guns-admin/src/test/java/com/stylefeng/guns/GunsApplicationTest.java +++ b/DriverQYTTravel/guns-admin/src/test/java/com/stylefeng/guns/GunsApplicationTest.java @@ -1,22 +1,36 @@ -//package com.stylefeng.guns; -// -//import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService; -//import org.junit.Test; -//import org.junit.runner.RunWith; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.boot.test.context.SpringBootTest; -//import org.springframework.test.context.junit4.SpringRunner; -// -//@RunWith(SpringRunner.class) -//@SpringBootTest -//public class GunsApplicationTest { -// -// @Autowired -// private IOrderLogisticsService orderLogisticsService; -// -// -// @Test -// public void queryVipLevelList() throws Exception { -// orderLogisticsService.process(434, 6, 104.0560028754, 30.5855897352, "四川省成都市武侯区石羊街道天府新谷成都高新技术产业开发区(南区)", ""); -// } -//} +package com.stylefeng.guns; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class GunsApplicationTest { + + @Autowired + private MongoTemplate mongoTemplate; + + + @Test + public void test(){ +// GeoJsonPoint point = new GeoJsonPoint(new Point(Double.parseDouble("104.043149"), +// Double.parseDouble("30.642483"))); +// DriverPosition position = mongoTemplate.findOne(Query.query(Criteria.where("driverId") +// .is(14)), DriverPosition.class); +// if(null == position){ +// position = new DriverPosition(); +// } +// position.setDriverId(14); +// position.setPoint(point); +// mongoTemplate.save(position); + + +// Query query = Query.query(Criteria.where("point").nearSphere(new Point(Double.parseDouble("104.043149"), Double.parseDouble("30.642483"))).maxDistance(5000)); +// List<DriverPosition> driverPositions = mongoTemplate.find(query, DriverPosition.class); +// System.err.println(driverPositions); + } +} -- Gitblit v1.7.1