|
@@ -18,6 +18,7 @@ import com.qs.mp.admin.domain.vo.LogisticsQueryVO;
|
|
|
import com.qs.mp.common.core.domain.AjaxResult;
|
|
|
import com.qs.mp.common.domain.DeliveryCompany;
|
|
|
import com.qs.mp.common.service.IDeliveryCompanyService;
|
|
|
+import com.qs.mp.common.utils.LogUtil;
|
|
|
import com.qs.mp.common.utils.MD5Util;
|
|
|
import io.swagger.annotations.*;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -71,10 +72,10 @@ public class LogisticsController extends BaseApiController {
|
|
|
.eq(DeliveryCompany::getDeliveryId, logisticsQueryParam.getDeliveryId()));
|
|
|
|
|
|
if (Objects.isNull(deliveryCompany)) {
|
|
|
- throw new RuntimeException("物流公司不存在");
|
|
|
+ return error("物流公司不存在");
|
|
|
}
|
|
|
if (StringUtils.isBlank(deliveryCompany.getCode())) {
|
|
|
- throw new RuntimeException("物流公司编码不存在");
|
|
|
+ return error("物流公司编码不存在");
|
|
|
}
|
|
|
|
|
|
// 封装物流请求参数
|
|
@@ -113,7 +114,7 @@ public class LogisticsController extends BaseApiController {
|
|
|
return AjaxResult.success(data);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ LogUtil.error(logger, e, "物流查询异常");
|
|
|
return AjaxResult.error(e.getMessage());
|
|
|
}
|
|
|
}
|
|
@@ -157,12 +158,7 @@ public class LogisticsController extends BaseApiController {
|
|
|
return AjaxResult.success(deliveryCompany);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- try {
|
|
|
- return AjaxResult.success();
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ LogUtil.error(logger, e, "自动单号识别异常");
|
|
|
return error(e.getMessage());
|
|
|
}
|
|
|
}
|