liujie
2 天以前 c0ffabe6c300432c2492485a47f88e990f9c7f8e
driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/service/impl/OrderServiceImpl.java
@@ -1538,22 +1538,22 @@
    public ResultUtil setOrderStatus(Integer uid, Long orderId, Integer payType, Integer state) throws Exception {
        try {
            boolean lock = redisUtil.lock(orderId + "",5);
            if(!lock){
                int num1 = 1;
                while (num1 <= 10){
                    Thread.sleep(3000);//等待3秒
                    lock = redisUtil.lock(orderId + "",5);
                    if(lock){
                        break;
                    }else{
                        num1++;
                    }
                }
            }
            if(!lock){
                redisUtil.unlock(orderId + "");
                return ResultUtil.error("请稍后重试");
            }
//            if(!lock){
//                int num1 = 1;
//                while (num1 <= 10){
//                    Thread.sleep(3000);//等待3秒
//                    lock = redisUtil.lock(orderId + "",5);
//                    if(lock){
//                        break;
//                    }else{
//                        num1++;
//                    }
//                }
//            }
//            if(!lock){
//                redisUtil.unlock(orderId + "");
//                return ResultUtil.error("请稍后重试");
//            }
            Order order = this.selectById(orderId);
            if(state == 107 && order.getState() != 106){
@@ -1562,7 +1562,7 @@
            }
            if(state == 108 && order.getState() != 107){
                redisUtil.unlock(orderId + "");
                return ResultUtil.error("操作失败,请刷新数据");
//                return ResultUtil.error("操作失败,请刷新数据");
            }
            order.setState(state);