ebike-plus/ebike-operations/src/test/java/com/cdzy/operations/EbikeOperationsApplicationTests.java

30 lines
1006 B
Java
Raw Normal View History

2025-09-15 15:48:54 +08:00
package com.cdzy.operations;
2025-09-15 10:36:01 +08:00
import com.cdzy.operations.mapper.EbikeBikeInfoMapper;
import com.cdzy.operations.model.entity.EbikeBikeInfo;
2025-10-21 14:29:10 +08:00
import com.mybatisflex.core.query.QueryWrapper;
2025-09-15 10:36:01 +08:00
import org.junit.jupiter.api.Test;
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;
2025-10-21 14:29:10 +08:00
import static com.cdzy.operations.model.entity.table.EbikeBikeInfoTableDef.EBIKE_BIKE_INFO;
2025-09-15 10:36:01 +08:00
@SpringBootTest
class EbikeOperationsApplicationTests {
2025-10-14 11:09:22 +08:00
@Autowired
private EbikeBikeInfoMapper ebikeBikeInfoMapper;
2025-09-15 10:36:01 +08:00
@Test
void contextLoads(){
2025-10-21 14:29:10 +08:00
QueryWrapper queryWrapper = new QueryWrapper()
.where(EBIKE_BIKE_INFO.BIKE_INFO_ID.eq("338128115027443712"));
EbikeBikeInfo info = ebikeBikeInfoMapper.selectOneByQuery(queryWrapper);
PGpoint pGpoint = new PGpoint(104.066541, 30.572269);
info.setLocation(pGpoint);
ebikeBikeInfoMapper.update(info);
2025-09-15 10:36:01 +08:00
}
}