From f0d06601a6be8c09ef5e8e7e76666cb1e8ef72a5 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 20 三月 2020 16:41:55 +0800 Subject: [PATCH] 团队补贴按照下单时间兼容 --- fanli/src/main/java/com/yeshi/fanli/service/impl/order/InviteOrderSubsidyServiceImplV2.java | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/InviteOrderSubsidyServiceImplV2.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/InviteOrderSubsidyServiceImplV2.java index 80e575c..dbbece5 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/InviteOrderSubsidyServiceImplV2.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/InviteOrderSubsidyServiceImplV2.java @@ -200,7 +200,9 @@ if (list != null && list.size() > 0) { // 蹇呴』鏄嚜璐鍗曟墠杩斿埄 HongBaoV2 parent = hongBaoV2Service.selectByPrimaryKey(list.get(0).getHongBaoV2().getId()); - if (parent != null && parent.getUrank() != UserLevelEnum.superVIP.getOrderRank()) {// 涓嶆槸瓒呯骇浼氬憳鐨勮嚜璐�/鍒嗕韩鎵嶈ˉ璐� + if (parent != null && parent.getUrank() != UserLevelEnum.superVIP.getOrderRank() + && (parent.getType() == HongBaoV2.TYPE_SHARE_GOODS || parent.getType() == HongBaoV2.TYPE_ZIGOU)) {// 涓嶆槸瓒呯骇浼氬憳鐨勮嚜璐�/鍒嗕韩鎵嶈ˉ璐� + boolean isShare = (parent.getType() == HongBaoV2.TYPE_SHARE_GOODS); List<CommonOrder> orderList = commonOrderService.listBySourceTypeAndOrderId(sourceType, orderId); if (orderList == null || orderList.size() == 0) @@ -282,7 +284,7 @@ else orderSubsidy.setLevel(InviteOrderSubsidy.LEVEL_TWO); // 浼氬憳鎵嶈兘琛ヨ创 - if (userLevel != UserLevelEnum.daRen) + if (userLevel != UserLevelEnum.daRen) { try { addOrderSubsidy(orderSubsidy); } catch (OrderTeamRewardException e) { @@ -290,6 +292,11 @@ } catch (CommonOrderException e) { throw new InviteOrderSubsidyException(e.getCode(), e.getMsg()); } + // 鍒嗕韩璧氫笉鑳戒娇鐢ㄨ繑鍒╁鍔卞埜锛屼笉鐢ㄧ瓑寰�5澶� + if (isShare) { + validByOrderIdAndSourceType(orderId, sourceType); + } + } } } } -- Gitblit v1.8.0