|  | @@ -8,6 +8,7 @@ import com.yonge.cooleshow.mall.common.enums.OrderCacheEnum;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.mbg.mapper.OmsOrderCourierMapper;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.mbg.model.OmsOrderCourier;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.portal.service.OmsOrderCourierService;
 | 
	
		
			
				|  |  | +import com.yonge.toolset.base.exception.BizException;
 | 
	
		
			
				|  |  |  import org.redisson.api.RLock;
 | 
	
		
			
				|  |  |  import org.redisson.api.RedissonClient;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
	
		
			
				|  | @@ -41,7 +42,11 @@ public class OmsOrderCourierServiceImpl implements OmsOrderCourierService {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      public OmsOrderCourier getCourierInfo(String deliverySn) {
 | 
	
		
			
				|  |  | -        return omsOrderCourierMapper.queryByCourierNo(deliverySn);
 | 
	
		
			
				|  |  | +        OmsOrderCourier omsOrderCourier = omsOrderCourierMapper.queryByCourierNo(deliverySn);
 | 
	
		
			
				|  |  | +        if (omsOrderCourier == null) {
 | 
	
		
			
				|  |  | +            throw new BizException("未找到物流信息");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        return omsOrderCourier;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
	
		
			
				|  | @@ -50,7 +55,10 @@ public class OmsOrderCourierServiceImpl implements OmsOrderCourierService {
 | 
	
		
			
				|  |  |          boolean b = lock.tryLock(1, TimeUnit.HOURS);
 | 
	
		
			
				|  |  |          if (b) {
 | 
	
		
			
				|  |  |              OmsOrderCourier omsOrderCourier = omsOrderCourierMapper.queryByCourierNo(deliverySn);
 | 
	
		
			
				|  |  | -            CourierInfo courierInfo = courierService.queryTrack(CompanyEnum.valueOf(omsOrderCourier.getCompany()),
 | 
	
		
			
				|  |  | +            if (omsOrderCourier == null) {
 | 
	
		
			
				|  |  | +                throw new BizException("未找到物流信息");
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            CourierInfo courierInfo = courierService.queryTrack(CompanyEnum.descOf(omsOrderCourier.getCompany()),
 | 
	
		
			
				|  |  |                                                                  omsOrderCourier.getCourierNo());
 | 
	
		
			
				|  |  |              updateCourierInfo(courierInfo);
 | 
	
		
			
				|  |  |          }
 |