From ee5c8055b1c0dd7c67a9025a76b10bd287c93d9a Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 15 四月 2020 09:52:27 +0800 Subject: [PATCH] 资金明细增加团队分红 --- fanli/src/main/java/com/yeshi/fanli/service/impl/order/HongBaoV2ServiceImpl.java | 56 ++++++++++++-------------------------------------------- 1 files changed, 12 insertions(+), 44 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/HongBaoV2ServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/HongBaoV2ServiceImpl.java index 9bfe81a..e50225f 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/HongBaoV2ServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/HongBaoV2ServiceImpl.java @@ -30,6 +30,7 @@ import com.yeshi.fanli.entity.bus.user.ThreeSale; import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo; import com.yeshi.fanli.entity.bus.user.UserInfo; +import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum; import com.yeshi.fanli.entity.order.CommonOrder; import com.yeshi.fanli.entity.order.CommonOrderGoods; import com.yeshi.fanli.entity.order.HongBaoOrder; @@ -205,54 +206,21 @@ userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType, commonOrder.getPayment(), money, goodsCount, commonOrder.getState(), commonOrder.getThirdCreateTime()); - break; case HongBaoV2.TYPE_ERJI: - userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType, commonOrder.getPayment(), money, goodsCount, commonOrder.getState(), commonOrder.getThirdCreateTime()); - break; case HongBaoV2.TYPE_SHARE_YIJI: - userOrderMsgNotificationService.orderShareFirstLevelStatistic(uid, orderId, orderType, - commonOrder.getPayment(), money, goodsCount, state, notify.getBeizhu()); + userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType, + commonOrder.getPayment(), money, goodsCount, commonOrder.getState(), + commonOrder.getThirdCreateTime()); + + case HongBaoV2.TYPE_SHARE_ERJI: + userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType, commonOrder.getPayment(), money, + goodsCount, commonOrder.getState(), commonOrder.getThirdCreateTime()); break; - } - } - } - - // 娣诲姞鏂扮増鏈�氱煡 - - if (!hasAdd) { - Iterator<Integer> its = notificationMap.keySet().iterator(); - while (its.hasNext()) { - Integer t = its.next(); - HongBaoV2 notify = notificationMap.get(t).getHongBaoV2(); - CommonOrder commonOrder = notificationMap.get(t).getCommonOrder(); - String orderId = commonOrderList.get(0).getOrderNo(); - Long uid = notify.getUserInfo().getId(); - BigDecimal money = notify.getMoney(); - switch (t) { - case HongBaoV2.TYPE_ZIGOU: - userOrderMsgNotificationService.orderFanLiStateChanged(uid, orderId, orderType, - commonOrder.getPayment(), money, state); - break; - case HongBaoV2.TYPE_SHARE_GOODS: - userOrderMsgNotificationService.orderShareStateChanged(uid, orderId, orderType, - commonOrder.getPayment(), money, state); - break; - case HongBaoV2.TYPE_YIJI: - userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId, orderType, - commonOrder.getPayment(), money, state); - break; - case HongBaoV2.TYPE_ERJI: - userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId, orderType, - commonOrder.getPayment(), money, state); - break; - case HongBaoV2.TYPE_SHARE_YIJI: - userOrderMsgNotificationService.orderShareFirstLevelStateChanged(uid, orderId, orderType, - commonOrder.getPayment(), money, state); } } } @@ -296,7 +264,7 @@ return false; if (type == HongBaoV2.TYPE_ZIGOU) {// 鑾峰彇鑷喘鐨勮繑鍒╂瘮渚� - BigDecimal fanliRate = hongBaoManageService.getFanLiRate(commonOrder.getCreateTime().getTime()); + BigDecimal fanliRate = hongBaoManageService.getFanLiRate(UserLevelEnum.daRen,commonOrder.getCreateTime().getTime()); // 鍏嶅崟澶勭悊 boolean mianDan = false; List<CommonOrder> orderList = commonOrderService.listBySourceTypeAndOrderId(Constant.SOURCE_TYPE_TAOBAO, @@ -550,7 +518,7 @@ && commonOrder.getSourcePosition().equalsIgnoreCase(TaoBaoConstant.TAOBAO_TLJ_RELATION_PID_DEFAULT)) fanliRate = hongBaoManageService.getTLJShareRate(commonOrder.getCreateTime().getTime()); else - fanliRate = hongBaoManageService.getShareRate(commonOrder.getCreateTime().getTime()); + fanliRate = hongBaoManageService.getShareRate(UserLevelEnum.daRen,commonOrder.getCreateTime().getTime()); List<ShareGoodsActivityOrder> list = shareGoodsActivityOrderService .listByOrderIdAndUid(commonOrder.getUserInfo().getId(), commonOrder.getOrderNo()); @@ -674,7 +642,7 @@ private void saveHongBao(CommonOrder commonOrder, int type, Map<Integer, HongBaoOrder> notificationMap) throws HongBaoException, UserAccountException { if (type == HongBaoV2.TYPE_ZIGOU) {// 鑾峰彇鑷喘鐨勮繑鍒╂瘮渚� - BigDecimal fanliRate = hongBaoManageService.getFanLiRate(commonOrder.getCreateTime().getTime()); + BigDecimal fanliRate = hongBaoManageService.getFanLiRate(UserLevelEnum.daRen,commonOrder.getCreateTime().getTime()); // 鏌ヨ鏄惁鏈夊厤鍗曡鍒� BigDecimal mianDanMoney = null; if (commonOrder.getState() == CommonOrder.STATE_JS || commonOrder.getState() == CommonOrder.STATE_FK) { @@ -889,7 +857,7 @@ && commonOrder.getSourcePosition().equalsIgnoreCase(TaoBaoConstant.TAOBAO_TLJ_RELATION_PID_DEFAULT))// 鏉ヨ嚜浜庢窐绀奸噾鐨勫垎浜� shareRate = hongBaoManageService.getTLJShareRate(commonOrder.getCreateTime().getTime()); else - shareRate = hongBaoManageService.getShareRate(commonOrder.getCreateTime().getTime()); + shareRate = hongBaoManageService.getShareRate(UserLevelEnum.daRen,commonOrder.getCreateTime().getTime()); // 鍒ゆ柇璁㈠崟鍒嗕韩娲诲姩鏄惁寮�鍚� if ("1".equalsIgnoreCase(configService.get(ConfigKeyEnum.shareGoodsActivityOpen.getKey()))) { -- Gitblit v1.8.0