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"));