From caa49e84736ce10de3c864fcd9d8754da75095e9 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Fri, 19 Aug 2022 13:53:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8C=BA=E5=9F=9F=E5=85=AC?= =?UTF-8?q?=E5=8F=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/cweb/controller/HighOrderController.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java index b4c561fc..b9c1518a 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java @@ -461,8 +461,13 @@ public class HighOrderController { if (request.getHeader("regionId") != null && request.getHeader("regionId").length() != 0) { SecRegion region = commonService.getParentByRegion(Long.valueOf(request.getHeader("regionId"))); - BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString()); - highOrder.setCompanyId(bsCompany.getId()); + if (region != null) { + BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString()); + if (bsCompany != null) { + highOrder.setCompanyId(bsCompany.getId()); + } + } + } highOrder.setMerchId(request.getHeader("mchId"));