“mitao”
2026-03-11 3a17201681b4a606c9290dcec578155f72f68804
bugfix
3个文件已修改
30 ■■■■■ 已修改文件
xp-robotaxi-api/src/main/java/com/xiaopeng/api/query/operation/PointPageListListQuery.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpPointServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/resources/mapper/XpPointMapper.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/java/com/xiaopeng/api/query/operation/PointPageListListQuery.java
@@ -26,4 +26,10 @@
    private String startTime;
    @ApiModelProperty(value = "创建结束时间 yyyy-MM-dd HH:mm:ss")
    private String endTime;
    @ApiModelProperty(value = "点位经度")
    private String pointLon;
    @ApiModelProperty(value = "点位纬度")
    private String pointLat;
}
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpPointServiceImpl.java
@@ -1,6 +1,7 @@
package com.xiaopeng.map.service.serviceimpl;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xiaopeng.api.dto.operation.PointAddDto;
@@ -46,9 +47,7 @@
import javax.annotation.Resource;
import java.time.LocalTime;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
@@ -379,6 +378,16 @@
    @Override
    public PageInfo<XpPoint> pageList(PointPageListListQuery query) {
        PageInfo<XpPoint> pageInfo = new PageInfo<>(query.getPageNum(),query.getPageSize());
        if (StringUtils.isNotBlank(query.getPointLonAndLat())) {
            List<String> lonAndLat = query.getPointLonAndLat().trim().contains(",") ? Arrays.asList(query.getPointLonAndLat().split(",")) :
                    query.getPointLonAndLat().trim().contains(" ") ? Arrays.asList(query.getPointLonAndLat().split(" ")) :
                            Collections.emptyList();
            if (CollUtil.isNotEmpty(lonAndLat)) {
                query.setPointLon(lonAndLat.get(0));
                query.setPointLat(lonAndLat.get(1));
            }
            query.setPointLonAndLat(null);
        }
        List<XpPoint> list = this.baseMapper.pageList(pageInfo,query);
        pageInfo.setRecords(list);
        return pageInfo;
xp-robotaxi-map-boot/src/main/resources/mapper/XpPointMapper.xml
@@ -136,10 +136,13 @@
            and xp.parking_time_limit = #{query.parkingTimeLimit}
        </if>
        <if test="query.pointLonAndLat != null and query.pointLonAndLat != ''">
            and #{query.pointLonAndLat}  like concat('%',xp.point_lon,'%')
        and #{query.pointLonAndLat}  like concat('%',xp.point_lat,'%')
            and xp.point_lon like concat('%',#{query.pointLonAndLat},'%')
            or xp.point_lat like concat('%',#{query.pointLonAndLat},'%')
        </if>
        <if test="query.pointLon != null and query.pointLon != '' and query.pointLat != null and query.pointLat != ''">
            and xp.point_lon like concat('%',#{query.pointLon},'%')
            and xp.point_lat like concat('%',#{query.pointLat},'%')
        </if>
        <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
            and xp.create_time between #{query.startTime} and #{query.endTime}
        </if>