| | |
| | | */ |
| | | @Override |
| | | public ResultUtil saveData(Reassign reassign, Integer uid, Integer type) throws Exception { |
| | | boolean lock = redisUtil.lock(reassign.getOrderId() + "_reassign", 10); |
| | | boolean lock = redisUtil.lock(reassign.getOrderId() + "_reassign", 10, 30); |
| | | if(!lock){ |
| | | int num1 = 1; |
| | | while (num1 <= 10){ |
| | | Thread.sleep(3000);//等待3秒 |
| | | lock = redisUtil.lock(reassign.getOrderId() + "_reassign", 10); |
| | | if(lock){ |
| | | break; |
| | | }else{ |
| | | num1++; |
| | | } |
| | | } |
| | | return ResultUtil.error("系统繁忙,请稍后重试"); |
| | | } |
| | | |
| | | ResultUtil resultUtil = ResultUtil.success(); |