|
@@ -50,11 +50,12 @@ public class OmsOrderCourierServiceImpl implements OmsOrderCourierService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void refreshCourier(String deliverySn) throws InterruptedException {
|
|
|
+ public OmsOrderCourier refreshCourier(String deliverySn) throws InterruptedException {
|
|
|
RLock lock = redissonClient.getLock(OrderCacheEnum.COURIER_LOCK.getCode());
|
|
|
- boolean b = lock.tryLock(1, TimeUnit.HOURS);
|
|
|
+ boolean b = lock.tryLock(0,1, TimeUnit.HOURS);
|
|
|
+
|
|
|
+ OmsOrderCourier omsOrderCourier = omsOrderCourierMapper.queryByCourierNo(deliverySn);
|
|
|
if (b) {
|
|
|
- OmsOrderCourier omsOrderCourier = omsOrderCourierMapper.queryByCourierNo(deliverySn);
|
|
|
if (omsOrderCourier == null) {
|
|
|
throw new BizException("未找到物流信息");
|
|
|
}
|
|
@@ -62,5 +63,6 @@ public class OmsOrderCourierServiceImpl implements OmsOrderCourierService {
|
|
|
omsOrderCourier.getCourierNo());
|
|
|
updateCourierInfo(courierInfo);
|
|
|
}
|
|
|
+ return omsOrderCourierMapper.queryByCourierNo(deliverySn);
|
|
|
}
|
|
|
}
|