From d5d37a5c70623747cb31a7ed41782ad4976ddb0c Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Mon, 31 Oct 2022 14:41:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E5=86=8C=E9=80=81?= =?UTF-8?q?=E5=88=B8=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BsDistributionUserRelServiceImpl.java | 20 +- v1/hai-v1.iml | 220 ------------------ 2 files changed, 12 insertions(+), 228 deletions(-) delete mode 100644 v1/hai-v1.iml diff --git a/hai-service/src/main/java/com/hai/service/impl/BsDistributionUserRelServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/BsDistributionUserRelServiceImpl.java index 09fa920b..49597167 100644 --- a/hai-service/src/main/java/com/hai/service/impl/BsDistributionUserRelServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/BsDistributionUserRelServiceImpl.java @@ -45,6 +45,7 @@ public class BsDistributionUserRelServiceImpl implements BsDistributionUserRelSe @Override public void insertDistributionRebate(Long userId, Long popularizeUserId , String regionId) { + HighUser user = highUserService.findByUserId(userId); HighUser pUser = highUserService.findByUserId(popularizeUserId); @@ -78,10 +79,13 @@ public class BsDistributionUserRelServiceImpl implements BsDistributionUserRelSe bsDistributionUserRelMapper.insert(distributionUserRel); - new Thread(() -> { + } + + new Thread(() -> { - try { + try { + if (regionId != null) { SecRegion region = commonService.getParentByRegion(Long.valueOf(regionId)); BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString()); @@ -93,7 +97,7 @@ public class BsDistributionUserRelServiceImpl implements BsDistributionUserRelSe freeMap.put("userPhone", user.getPhone()); highDiscountPackageService.freeUserDiscountPackage(freeMap); - if (pUser.getIsAgent() == null) { + if (pUser != null && pUser.getIsAgent() == null) { // 查询推广有礼优惠券包 HighDiscountPackage promoteDiscountPackage = highDiscountPackageService.getCallExclusive(4 , bsCompany.getId().intValue()); Map freeMap1 = new HashMap<>(); @@ -102,13 +106,13 @@ public class BsDistributionUserRelServiceImpl implements BsDistributionUserRelSe freeMap1.put("userPhone", pUser.getPhone()); highDiscountPackageService.freeUserDiscountPackage(freeMap1); } - - } catch (Exception e) { - e.printStackTrace(); } - }).start(); - } + } catch (Exception e) { + e.printStackTrace(); + } + + }).start(); } diff --git a/v1/hai-v1.iml b/v1/hai-v1.iml deleted file mode 100644 index 9ecb2698..00000000 --- a/v1/hai-v1.iml +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file