Pu Zhibing
2025-08-22 ed60e03c0458d97b6852dcb84b8ccafba70d2137
提交代码
1个文件已修改
1个文件已添加
37 ■■■■ 已修改文件
user/guns-admin/src/main/java/com/supersavedriving/user/config/QYTConfig.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/service/impl/OrderServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
user/guns-admin/src/main/java/com/supersavedriving/user/config/QYTConfig.java
New file
@@ -0,0 +1,30 @@
package com.supersavedriving.user.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
 * @author zhibing.pu
 * @Date 2025/8/12 13:58
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "qyt")
public class QYTConfig {
    /**
     * 出行网关接口地址
     */
    private String chuxingUrl;
    /**
     * 长连接地址
     */
    private String socketUri;
    /**
     * 管理后台url
     */
    private String adminUrl;
}
user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/service/impl/OrderServiceImpl.java
@@ -435,11 +435,6 @@
     */
    @Override
    public ResultUtil travelOrder(Integer uid, TravelOrder travelOrder) throws Exception {
        RLock lock1 = redissonClient.getLock("travelOrder:" + uid);
        boolean lock2 = lock1.tryLock(5, 10, TimeUnit.SECONDS);
        if(!lock2){
            return ResultUtil.error("系统繁忙,请稍后重试");
        }
        try {
            List<Integer> state = Arrays.asList(101, 102, 103, 104, 105, 106, 107, 201, 401);
            Order order = this.selectOne(new EntityWrapper<Order>().eq("userId", uid).eq("status", 1).in("state", state));
@@ -558,8 +553,6 @@
            return ResultUtil.success(order.getId());
        }catch (Exception e){
            e.printStackTrace();
        }finally {
            lock1.unlock();
        }
        return ResultUtil.error("系统异常");
    }