2025-09-15 15:48:54 +08:00
|
|
|
package com.cdzy.operations;
|
2025-09-15 10:36:01 +08:00
|
|
|
|
2025-10-17 11:28:14 +08:00
|
|
|
import com.cdzy.operations.mapper.EbikeBikeInfoMapper;
|
|
|
|
|
import com.cdzy.operations.model.entity.EbikeBikeInfo;
|
2025-09-15 10:36:01 +08:00
|
|
|
import org.junit.jupiter.api.Test;
|
2025-10-17 11:28:14 +08:00
|
|
|
import org.postgresql.geometric.PGpoint;
|
2025-10-14 11:09:22 +08:00
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
2025-09-15 10:36:01 +08:00
|
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
|
|
|
|
|
|
|
@SpringBootTest
|
|
|
|
|
class EbikeOperationsApplicationTests {
|
|
|
|
|
|
2025-10-14 11:09:22 +08:00
|
|
|
@Autowired
|
2025-10-17 11:28:14 +08:00
|
|
|
private EbikeBikeInfoMapper ebikeBikeInfoMapper;
|
2025-10-15 10:47:08 +08:00
|
|
|
|
2025-09-15 10:36:01 +08:00
|
|
|
@Test
|
2025-10-14 11:09:22 +08:00
|
|
|
void contextLoads() throws Exception {
|
2025-10-17 11:28:14 +08:00
|
|
|
EbikeBikeInfo bikeInfo = new EbikeBikeInfo();
|
|
|
|
|
// 创建测试点:X经度、纬度
|
|
|
|
|
PGpoint point =new PGpoint(116.3974, 39.9093);
|
|
|
|
|
bikeInfo.setLocation(point);
|
|
|
|
|
bikeInfo.setLongitude(String.valueOf(point.x));
|
|
|
|
|
bikeInfo.setLatitude(String.valueOf(point.y));
|
|
|
|
|
ebikeBikeInfoMapper.insert(bikeInfo);
|
2025-09-15 10:36:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|