puzhibing
2026-03-13 9158c8618137a065bbb70969822cb43bf7f1d7cf
Merge remote-tracking branch 'origin/master'
25个文件已修改
305 ■■■■■ 已修改文件
xp-robotaxi-api/src/main/java/com/xiaopeng/api/dto/operation/PointAddDto.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/java/com/xiaopeng/api/dto/operation/PointUpdateDto.java 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/java/com/xiaopeng/api/query/operation/ElectronicPageListQuery.java 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-common/xp-common-core/src/main/java/com/xiaopeng/common/core/constant/CacheConstants.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-common/xp-common-core/src/main/java/com/xiaopeng/common/core/constant/SecurityConstants.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-common/xp-common-core/src/main/java/com/xiaopeng/common/core/context/SecurityContextHolder.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-common/xp-common-core/src/main/java/com/xiaopeng/common/core/utils/JwtUtils.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-common/xp-common-security/src/main/java/com/xiaopeng/common/security/auth/AuthLogic.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-common/xp-common-security/src/main/java/com/xiaopeng/common/security/auth/AuthUtil.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-common/xp-common-security/src/main/java/com/xiaopeng/common/security/interceptor/HeaderInterceptor.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-common/xp-common-security/src/main/java/com/xiaopeng/common/security/service/TokenService.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-common/xp-common-security/src/main/java/com/xiaopeng/common/security/utils/SecurityUtils.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-gateway-boot/src/main/java/com/xiaopeng/gateway/filter/AuthFilter.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/constant/I18nKeyConstant.java 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpVehicleRepairController.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/dto/XpVehicleRepairReturnDTO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-maintenance-boot/src/main/resources/i18n/messages.properties 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-maintenance-boot/src/main/resources/i18n/messages_en_US.properties 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-maintenance-boot/src/main/resources/i18n/messages_zh_CN.properties 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpPointManagementController.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpElectronicFenceServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/resources/mapper/XpElectronicFenceMapper.xml 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpPricingController.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-operation-boot/src/main/resources/mapper/operation/XpElectronicFenceMapper.xml 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/config/DataUpdateHandlerConfig.java 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/java/com/xiaopeng/api/dto/operation/PointAddDto.java
@@ -18,6 +18,9 @@
public class PointAddDto implements Serializable {
    @ApiModelProperty(value = "电子围栏区域id")
    private Long electronicAreaId;
    @ApiModelProperty(value = "电子围栏id")
    private String fenceId;
    @ApiModelProperty(value = "点位名称")
    @NotEmpty(message = "点位名称不能为空")
    private String pointName;
xp-robotaxi-api/src/main/java/com/xiaopeng/api/dto/operation/PointUpdateDto.java
@@ -17,6 +17,10 @@
    private Long id;
    @ApiModelProperty(value = "电子围栏区域id")
    private Long electronicAreaId;
    @ApiModelProperty(value = "围栏id")
    private String fenceId;
    @ApiModelProperty(value = "点位名称")
    @NotBlank(message = "点位名称不能为空")
xp-robotaxi-api/src/main/java/com/xiaopeng/api/query/operation/ElectronicPageListQuery.java
@@ -33,7 +33,7 @@
    @ApiModelProperty(value = "更新结束时间")
    private String updateEndTime;
    @ApiModelProperty(value = "开始时间 1正序 2倒序")
    private String createSort;
    private Integer createSort;
    @ApiModelProperty(value = "更新时间 1正序 2倒序")
    private String updateSort;
    private Integer updateSort;
}
xp-robotaxi-common/xp-common-core/src/main/java/com/xiaopeng/common/core/constant/CacheConstants.java
@@ -10,7 +10,7 @@
    /**
     * 缓存有效期,默认720(分钟)
     */
    public final static long EXPIRATION = 720;
    public final static long EXPIRATION = 720 * 2; //24小时
    public final static long EXPIRATION_APPLET = 365 * 24 * 60;
    /**
xp-robotaxi-common/xp-common-core/src/main/java/com/xiaopeng/common/core/constant/SecurityConstants.java
@@ -42,7 +42,7 @@
    public static final String OPERATION_USER_KEY = "operation_user_key";
    /**
     * 用户类型(system/applet)
     * 用户类型(system/operation)
     */
    public static final String USER_TYPE = "user_type";
    /**
@@ -59,4 +59,9 @@
     * 角色权限
     */
    public static final String ROLE_PERMISSION = "role_permission";
    /**
     * 登录运维人员
     */
    public static final String LOGIN_OPERATION_USER = "login_oeeration_user";
}
xp-robotaxi-common/xp-common-core/src/main/java/com/xiaopeng/common/core/context/SecurityContextHolder.java
@@ -76,11 +76,20 @@
        return get(SecurityConstants.USER_KEY);
    }
    public static String getOperationUserKey()
    {
        return get(SecurityConstants.OPERATION_USER_KEY);
    }
    public static void setUserKey(String userKey)
    {
        set(SecurityConstants.USER_KEY, userKey);
    }
    public static void setOperationUserKey(String userKey)
    {
        set(SecurityConstants.OPERATION_USER_KEY, userKey);
    }
    public static String getPermission()
    {
        return get(SecurityConstants.ROLE_PERMISSION);
xp-robotaxi-common/xp-common-core/src/main/java/com/xiaopeng/common/core/utils/JwtUtils.java
@@ -73,6 +73,17 @@
    {
        return getValue(claims, SecurityConstants.USER_KEY);
    }
    /**
     * 根据令牌获取运维用户标识
     *
     * @param claims 身份信息
     * @return 用户ID
     */
    public static String getOperationUserKey(Claims claims)
    {
        return getValue(claims, SecurityConstants.OPERATION_USER_KEY);
    }
    
    /**
     * 根据令牌获取用户类型
xp-robotaxi-common/xp-common-security/src/main/java/com/xiaopeng/common/security/auth/AuthLogic.java
@@ -4,6 +4,7 @@
import java.util.HashSet;
import java.util.Set;
import com.xiaopeng.api.vo.account.LoginOperationUser;
import com.xiaopeng.common.core.utils.JwtUtils;
import com.xiaopeng.api.vo.account.LoginUser;
import io.jsonwebtoken.Claims;
@@ -106,6 +107,16 @@
    }
    /**
     * 获取当前运维用户缓存信息, 如果未登录,则抛出异常
     *
     * @param token 前端传递的认证信息
     * @return 用户缓存信息
     */
    public LoginOperationUser getOperationLoginUser(String token)
    {
        return tokenService.getLoginOperationUser(token);
    }
    /**
     * 验证当前用户有效期, 如果相差不足120分钟,自动刷新缓存
     * 
     * @param loginUser 当前用户信息
@@ -116,6 +127,16 @@
    }
    /**
     * 验证当前用户有效期, 如果相差不足120分钟,自动刷新缓存
     *
     * @param loginOperationUser 当前用户信息
     */
    public void verifyOperationLoginUserExpire(LoginOperationUser loginOperationUser)
    {
        tokenService.verifyToken(loginOperationUser);
    }
    /**
     * 验证用户是否具备某权限
     * 
     * @param permission 权限字符串
xp-robotaxi-common/xp-common-security/src/main/java/com/xiaopeng/common/security/auth/AuthUtil.java
@@ -1,5 +1,6 @@
package com.xiaopeng.common.security.auth;
import com.xiaopeng.api.vo.account.LoginOperationUser;
import com.xiaopeng.common.security.annotation.RequiresPermissions;
import com.xiaopeng.common.security.annotation.RequiresRoles;
import com.xiaopeng.api.vo.account.LoginUser;
@@ -54,6 +55,17 @@
    }
    /**
     * 获取当前登录用户信息
     *
     * @param token 指定token
     * @return 用户信息
     */
    public static LoginOperationUser getOperationLoginUser(String token)
    {
        return authLogic.getOperationLoginUser(token);
    }
    /**
     * 验证当前用户有效期
     * 
     * @param loginUser 用户信息
@@ -62,7 +74,15 @@
    {
        authLogic.verifyLoginUserExpire(loginUser);
    }
    /**
     * 验证当前用户有效期
     *
     * @param loginOperationUser 用户信息
     */
    public static void verifyOperationLoginUserExpire(LoginOperationUser loginOperationUser)
    {
        authLogic.verifyOperationLoginUserExpire(loginOperationUser);
    }
    /**
     * 当前账号是否含有指定角色标识, 返回true或false
     * 
xp-robotaxi-common/xp-common-security/src/main/java/com/xiaopeng/common/security/interceptor/HeaderInterceptor.java
@@ -3,7 +3,10 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.xiaopeng.api.vo.account.LoginOperationUser;
import com.xiaopeng.api.vo.account.LoginUser;
import com.xiaopeng.common.core.utils.JwtUtils;
import io.jsonwebtoken.Claims;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.AsyncHandlerInterceptor;
import com.xiaopeng.common.core.constant.SecurityConstants;
@@ -32,15 +35,27 @@
        SecurityContextHolder.setUserId(ServletUtils.getHeader(request, SecurityConstants.DETAILS_USER_ID));
        SecurityContextHolder.setUserName(ServletUtils.getHeader(request, SecurityConstants.DETAILS_USERNAME));
        SecurityContextHolder.setUserKey(ServletUtils.getHeader(request, SecurityConstants.USER_KEY));
        SecurityContextHolder.setOperationUserKey(ServletUtils.getHeader(request, SecurityConstants.OPERATION_USER_KEY));
        String token = SecurityUtils.getToken();
        if (StringUtils.isNotEmpty(token))
        {
            LoginUser loginUser = AuthUtil.getLoginUser(token);
            if (StringUtils.isNotNull(loginUser))
            {
                AuthUtil.verifyLoginUserExpire(loginUser);
                SecurityContextHolder.set(SecurityConstants.LOGIN_USER, loginUser);
            String userType = JwtUtils.getUserType(token);
            if ("system".equals(userType)) {
                LoginUser loginUser = AuthUtil.getLoginUser(token);
                if (StringUtils.isNotNull(loginUser))
                {
                    AuthUtil.verifyLoginUserExpire(loginUser);
                    SecurityContextHolder.set(SecurityConstants.LOGIN_USER, loginUser);
                }
            }
            if ("operation".equals(userType)) {
                LoginOperationUser operationLoginUser = AuthUtil.getOperationLoginUser(token);
                if (StringUtils.isNotNull(operationLoginUser))
                {
                    AuthUtil.verifyOperationLoginUserExpire(operationLoginUser);
                    SecurityContextHolder.set(SecurityConstants.LOGIN_OPERATION_USER, operationLoginUser);
                }
            }
        }
        return true;
xp-robotaxi-common/xp-common-security/src/main/java/com/xiaopeng/common/security/service/TokenService.java
@@ -207,6 +207,19 @@
            refreshToken(loginUser);
        }
    }
    /**
     * 验证令牌有效期,相差不足120分钟,自动刷新缓存
     *
     * @param loginOperationUser
     */
    public void verifyToken(LoginOperationUser loginOperationUser) {
        long expireTime = loginOperationUser.getExpireTime();
        long currentTime = System.currentTimeMillis();
        if (expireTime - currentTime <= MILLIS_MINUTE_TEN) {
            refreshTokenOperationUser(loginOperationUser);
        }
    }
    
    /**
     * 刷新令牌有效期
xp-robotaxi-common/xp-common-security/src/main/java/com/xiaopeng/common/security/utils/SecurityUtils.java
@@ -2,6 +2,7 @@
import javax.servlet.http.HttpServletRequest;
import com.xiaopeng.api.vo.account.LoginOperationUser;
import com.xiaopeng.api.vo.account.LoginUser;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import com.xiaopeng.common.core.constant.SecurityConstants;
@@ -50,6 +51,13 @@
    }
    /**
     * 获取登录运维人员信息
     */
    public static LoginOperationUser getLoginOperationUser()
    {
        return SecurityContextHolder.get(SecurityConstants.LOGIN_OPERATION_USER, LoginOperationUser.class);
    }
    /**
     * 获取请求token
     */
    public static String getToken()
xp-robotaxi-gateway-boot/src/main/java/com/xiaopeng/gateway/filter/AuthFilter.java
@@ -66,18 +66,37 @@
        }catch (Exception e){
            return unauthorizedResponse(exchange, e.getMessage());
        }
        String token = getToken(request);
        Claims claims = JwtUtils.parseToken(token);
        String userkey = JwtUtils.getUserKey(claims);
        String userid = JwtUtils.getUserId(claims);
        String username = JwtUtils.getUserName(claims);
        String userType = JwtUtils.getUserType(claims);
        String operationUserKey = JwtUtils.getOperationUserKey(claims);
        String redisKey = "";
        if ("system".equals(userType)) {
            redisKey = StringUtils.isNotBlank(userkey) ? getTokenKey(userkey) : "";
        }
        if ("operation".equals(userType)) {
            redisKey = StringUtils.isNotBlank(operationUserKey) ? getTokenKey(operationUserKey) : "";
        }
        if (StringUtils.isBlank(redisKey)) {
            return unauthorizedResponse(exchange, "登录状态已过期");
        }
        boolean islogin = redisService.hasKey(redisKey);
        if (!islogin)
        {
            return unauthorizedResponse(exchange, "登录状态已过期");
        }
        // 设置用户信息到请求
        addHeader(mutate, SecurityConstants.USER_KEY, userkey);
        addHeader(mutate, SecurityConstants.DETAILS_USER_ID, userid);
        addHeader(mutate, SecurityConstants.DETAILS_USERNAME, username);
        addHeader(mutate, SecurityConstants.USER_TYPE, userType);
        addHeader(mutate, SecurityConstants.OPERATION_USER_KEY, operationUserKey);
        // 内部请求来源参数清除
        removeHeader(mutate, SecurityConstants.FROM_SOURCE);
        return chain.filter(exchange.mutate().request(mutate.build()).build());
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/constant/I18nKeyConstant.java
@@ -9,4 +9,5 @@
    String TASK_NOT_EXIST = "task.not.exist";
    String VEHICLE_NOT_EXIST = "vehicle.not.exist";
    String REPAIR_MONEY_TOO_LONG = "repair.money.too.long";
}
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpVehicleRepairController.java
@@ -3,8 +3,10 @@
import com.xiaopeng.api.model.maintenance.XpVehicleRepair;
import com.xiaopeng.common.core.domain.R;
import com.xiaopeng.common.core.exception.ServiceException;
import com.xiaopeng.common.core.web.page.PageInfo;
import com.xiaopeng.common.security.service.TokenService;
import com.xiaopeng.maintenance.constant.I18nKeyConstant;
import com.xiaopeng.maintenance.dto.XpVehicleRepairReturnDTO;
import com.xiaopeng.maintenance.dto.XpVehicleRepairStartDTO;
import com.xiaopeng.maintenance.model.query.XpVehicleRepairPageQuery;
@@ -54,10 +56,12 @@
     */
    @ApiOperation(value = "车辆运维-车辆运维-车辆取回", tags = {"运维APP-车辆管理"})
    @PostMapping("/api/v1/vehicleRepair/saveReturnRepair")
    public R<String> saveReturnRepair(@Validated @RequestBody XpVehicleRepairReturnDTO dto) {
    public R<String> saveReturnRepair(@RequestBody XpVehicleRepairReturnDTO dto) {
        Long id = tokenService.getLoginOperationUser().getId();
        if (dto.getRepairMoney().toString().length() > 200) {
            throw new ServiceException("维修费用不能超过200字符", I18nKeyConstant.REPAIR_MONEY_TOO_LONG);
        }
        XpVehicleRepair xpVehicleRepair = xpVehicleRepairService.getById(dto.getId());
        xpVehicleRepair.setVehicleId(null);
        // 修改车辆取回信息
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/dto/XpVehicleRepairReturnDTO.java
@@ -5,6 +5,7 @@
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Max;
import java.io.Serializable;
@Data
@@ -14,7 +15,6 @@
    @ApiModelProperty(value = "维修id")
    private Long id;
    @Length(max = 200, message = "维修费用长度不能超过200字")
    @ApiModelProperty(value = "维修费用")
    private Double repairMoney;
xp-robotaxi-maintenance-boot/src/main/resources/i18n/messages.properties
@@ -1,4 +1,5 @@
# 中文
welcome.message=欢迎来到我们的应用程序!
task.not.exist=任务不存在
vehicle.not.exist=车辆不存在
vehicle.not.exist=车辆不存在
repair.money.too.long=维修费用不能超过200字符
xp-robotaxi-maintenance-boot/src/main/resources/i18n/messages_en_US.properties
@@ -2,4 +2,5 @@
welcome.message=Welcome to our application!
task.not.exist=The task does not exist.
vehicle.not.exist=The vehicle does not exist.
repair.money.too.long=The maintenance cost cannot exceed 200 characters
task.rule.not.config=The vehicle accident task allocation rules have not been configured
xp-robotaxi-maintenance-boot/src/main/resources/i18n/messages_zh_CN.properties
@@ -2,4 +2,5 @@
welcome.message=欢迎来到我们的应用程序!
task.not.exist=任务不存在
vehicle.not.exist=车辆不存在
repair.money.too.long=维修费用不能超过200字符
task.rule.not.config=未配置车辆事故任务分配规则
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpPointManagementController.java
@@ -16,6 +16,7 @@
import com.xiaopeng.common.core.web.page.PageInfo;
import com.xiaopeng.api.dto.map.XpPointExportExcelQuery;
import com.xiaopeng.map.exportExcel.XpPointExportExcel;
import com.xiaopeng.map.mangodb.service.XpGeoFencingPolygonService;
import com.xiaopeng.map.service.XpElectronicFenceAreaService;
import com.xiaopeng.map.service.XpElectronicFenceService;
import com.xiaopeng.map.service.XpPointService;
@@ -64,6 +65,8 @@
    private XpElectronicFenceAreaService xpElectronicFenceAreaService;
    @Resource
    private XpElectronicFenceService xpElectronicFenceService;
    @Resource
    private XpGeoFencingPolygonService xpGeoFencingPolygonService;
    @ApiOperation(value = "获取所有运营中的区域", response = XpElectronicFenceArea.class)
@@ -152,6 +155,9 @@
    @ResponseBody
    @ApiOperation(value = "新增点位")
    public R<XpPoint> add(@Validated @RequestBody PointAddDto pointAddDto) {
        if (!xpGeoFencingPolygonService.isInFence(pointAddDto.getPointLon(), pointAddDto.getPointLat(), pointAddDto.getFenceId(), "prohibited_area")) {
            return R.fail("in_prohibited_area");
        }
        return R.ok(xpPointService.addPointWithGeneratedNumber(pointAddDto));
    }
@@ -177,8 +183,17 @@
        XpPoint xpPoint = xpPointService.getById(pointAddDto.getId());
        if (!xpPoint.getElectronicAreaId().equals(pointAddDto.getElectronicAreaId())) {
            BeanUtils.copyProperties(pointAddDto, xpPoint);
            if (!xpGeoFencingPolygonService.isInFence(pointAddDto.getPointLon(), pointAddDto.getPointLat(), pointAddDto.getFenceId(), "prohibited_area")) {
                return R.fail("in_prohibited_area");
            }
            xpPointService.updateById(xpPoint);
        } else {
            if (!xpGeoFencingPolygonService.isInFence(pointAddDto.getPointLon(), pointAddDto.getPointLat(), pointAddDto.getFenceId(), "prohibited_area")) {
                return R.fail("in_prohibited_area");
            }
            //先删除原有的数据,因为会存在点位的从属区域变化的情况,所以先删除原有的数据后添加新的数据重新分片到新的库中
            BeanUtils.copyProperties(pointAddDto, xpPoint);
            xpPointService.removeById(pointAddDto.getId());
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpElectronicFenceServiceImpl.java
@@ -86,9 +86,6 @@
        }
        normalizeProhibitedAreaCountFilter(query);
        PageInfo<XpElectronicFence> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
        if (StringUtils.isEmpty(query.getCreateSort())&& StringUtils.isEmpty(query.getUpdateSort())){
            query.setCreateSort("2");
        }
        List<XpElectronicFence> list = this.baseMapper.pageList(pageInfo, query);
        if (list.isEmpty()) {
            return new PageInfo<>();
xp-robotaxi-map-boot/src/main/resources/mapper/XpElectronicFenceMapper.xml
@@ -30,7 +30,7 @@
        from xp_electronic_fence ef
        left join xp_electronic_fence_area efa on efa.electronic_id = ef.id and efa.is_deleted = 0
        where ef.is_deleted = 0
        <if test="query.electronicNumberOrName != null">
        <if test="query.electronicNumberOrName != null and query.electronicNumberOrName != ''">
            and( ef.electronic_name like concat('%',#{query.electronicNumberOrName},'%')
            or ef.electronic_number like concat('%',#{query.electronicNumberOrName},'%')
            )
@@ -71,39 +71,27 @@
                having sum(case when efa.area_type = 2 then 1 else 0 end) &lt;= #{query.prohibitedAreaCountMax}
            </when>
        </choose>
        <if test="query.createSort != null and query.updateSort != null">
            order by
            <if test="query.createSort == 1">
                ef.create_time asc,
            </if>
            <if test="query.createSort == 2">
                ef.create_time desc,
            </if>
            <if test="query.updateSort == 1">
                ef.update_time asc
            </if>
            <if test="query.updateSort == 2">
                ef.update_time desc
            </if>
        </if>
        <if test="query.createSort != null">
            order by
            <if test="query.createSort == 1">
                ef.create_time asc
            </if>
            <if test="query.createSort == 2">
                ef.create_time desc
            </if>
        </if>
        <if test="query.updateSort != null">
            order by
            <if test="query.updateSort == 1">
                ef.update_time asc
            </if>
            <if test="query.updateSort == 2">
                ef.update_time desc
            </if>
        </if>
        <choose>
            <when test="query.createSort == 1 or query.createSort == 2 or query.updateSort == 1 or query.updateSort == 2">
                <trim prefix="order by" suffixOverrides=",">
                    <if test="query.createSort == 1">
                        ef.create_time asc,
                    </if>
                    <if test="query.createSort == 2">
                        ef.create_time desc,
                    </if>
                    <if test="query.updateSort == 1">
                        ef.update_time asc,
                    </if>
                    <if test="query.updateSort == 2">
                        ef.update_time desc,
                    </if>
                </trim>
            </when>
            <otherwise>
                order by ef.update_time desc
            </otherwise>
        </choose>
    </select>
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpPricingController.java
@@ -60,7 +60,7 @@
    @PostMapping("/base/v1/mini-program/navigation/route-and-fare")
    @ApiOperation(value = "导航-获取路线和费用", tags = {"小程序-获取路线和费用"}, response = RouteAndFareVo.class)
    @ApiOperation(value = "导航-获取路线和费用(弃用)", tags = {"小程序-获取路线和费用(弃用)"}, response = RouteAndFareVo.class)
    @XpClientCheck(checkToken = false, checkOtpToken = true)
    public R<RouteAndFareVo> getRouteAndFare(@RequestBody @Valid RouteAndFareDto routeAndFareDto, HttpServletRequest request) {
        // uid已通过拦截器otp校验,可以直接使用
@@ -83,7 +83,7 @@
    @GetMapping("/base/v1/mini-program/pricing/rules/{openCityId}")
    @ApiOperation(value = "获取费用规则", tags = {"小程序-根据开通城市获取费用规则"}, response = String.class)
    @ApiOperation(value = "获取费用规则(弃用)", tags = {"小程序-根据开通城市获取费用规则(弃用)"}, response = String.class)
    public R<?> getPricingRules(@PathVariable Long openCityId) {
        XpPricing xpPricing = xpPricingService.getOne(new LambdaQueryWrapper<XpPricing>().eq(XpPricing::getCityId, openCityId).eq(XpPricing::getPricingType, 1).last("limit 1"));
        if (xpPricing != null) {
@@ -99,7 +99,7 @@
     * @return
     */
    @PostMapping("/base/v1/mini-program/pricing/getWaitTime")
    @ApiOperation(value = "获取等待时间", tags = {"小程序-获取等待时间"}, response = Integer.class)
    @ApiOperation(value = "获取等待时间(弃用)", tags = {"小程序-获取等待时间(弃用)"}, response = Integer.class)
    public R<Integer> getWaitTime(@RequestBody LonLatDto dto) {
        return R.ok(xpPricingService.getWaitTime(dto.getLongitude(), dto.getLatitude()));
    }
@@ -151,7 +151,7 @@
     * 播单
     */
    @PostMapping("/base/v1/mini-program/order/save")
    @ApiOperation(value = "保存订单", tags = {"小程序-保存订单"})
    @ApiOperation(value = "保存订单(弃用)", tags = {"小程序-保存订单(弃用)"})
    @XpClientCheck(checkToken = false, checkOtpToken = true)
    public R<SaveOrderVo> saveOrder(@RequestBody @Validated XpOrderDto dto, HttpServletRequest request) {
        String uid = request.getHeader("XP-Uid");
xp-robotaxi-operation-boot/src/main/resources/mapper/operation/XpElectronicFenceMapper.xml
@@ -12,7 +12,7 @@
        from xp_electronic_fence ef
        left join xp_electronic_fence_area efa on efa.electronic_id = ef.id
        where ef.is_deleted = 0
        <if test="query.electronicNumberOrName != null">
        <if test="query.electronicNumberOrName != null and query.electronicNumberOrName != ''">
            and( ef.electronic_name like concat('%',#{query.electronicNumberOrName},'%')
                or ef.electronic_number like concat('%',#{query.electronicNumberOrName},'%')
                )
@@ -45,39 +45,27 @@
            and #{query.updateEndTime} >= ef.update_time
        </if>
        group by ef.id
        <if test="query.createSort != null and query.updateSort != null">
         order by
            <if test="query.createSort == 1">
                ef.create_time asc,
            </if>
            <if test="query.createSort == 2">
                ef.create_time desc,
            </if>
            <if test="query.updateSort == 1">
                ef.update_time asc
            </if>
            <if test="query.updateSort == 2">
                ef.update_time desc
            </if>
        </if>
        <if test="query.createSort != null">
            order by
            <if test="query.createSort == 1">
                ef.create_time asc
            </if>
            <if test="query.createSort == 2">
                ef.create_time desc
            </if>
        </if>
        <if test="query.updateSort != null">
            order by
            <if test="query.updateSort == 1">
                ef.update_time asc
            </if>
            <if test="query.updateSort == 2">
                ef.update_time desc
            </if>
        </if>
        <choose>
            <when test="query.createSort == 1 or query.createSort == 2 or query.updateSort == 1 or query.updateSort == 2">
                <trim prefix="order by" suffixOverrides=",">
                    <if test="query.createSort == 1">
                        ef.create_time asc,
                    </if>
                    <if test="query.createSort == 2">
                        ef.create_time desc,
                    </if>
                    <if test="query.updateSort == 1">
                        ef.update_time asc,
                    </if>
                    <if test="query.updateSort == 2">
                        ef.update_time desc,
                    </if>
                </trim>
            </when>
            <otherwise>
                order by ef.update_time desc
            </otherwise>
        </choose>
    </select>
xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/config/DataUpdateHandlerConfig.java
@@ -47,7 +47,6 @@
        }
        this.setFieldValByName("createTime", LocalDateTime.now(), metaObject);
        this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject);
        this.setFieldValByName("createBy", userName, metaObject);
    }
    /**