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-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;
|
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;
|
|
|
|
|
|
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
|
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-17 14:30:43 +08:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|