From d4588f4e43336b26b356b869c29d0c76390167d5 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 15 四月 2020 10:22:51 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div --- fanli/src/main/java/com/yeshi/fanli/service/manger/order/HongBaoV2AddManager.java | 20 ++++++++------------ 1 files changed, 8 insertions(+), 12 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/manger/order/HongBaoV2AddManager.java b/fanli/src/main/java/com/yeshi/fanli/service/manger/order/HongBaoV2AddManager.java index 2527f19..f88be87 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/manger/order/HongBaoV2AddManager.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/manger/order/HongBaoV2AddManager.java @@ -171,7 +171,7 @@ * 閫氱煡鐢ㄦ埛鐨勮繑鍒╂儏鍐� */ - if (!Constant.IS_TEST) { +// if (!Constant.IS_TEST) { if (hasAdd) { Iterator<Integer> its = notificationMap.keySet().iterator(); while (its.hasNext()) { @@ -223,7 +223,7 @@ } } - } +// } } int resultCode = 0; @@ -252,7 +252,6 @@ return CommonOrder.STATE_SX; } - @Transactional(rollbackFor = Exception.class) private boolean updateHongBao(HongBaoOrder hongBaoOrder, CommonOrder commonOrder, int type, Map<Integer, HongBaoOrder> notificationMap, Date placeOrderTime) throws HongBaoException, UserAccountException { @@ -688,13 +687,11 @@ } child.setUserInfo(user); - child.setUrank(user.getRank()); + child.setUrank(userLevel.getOrderRank()); child.setVersion(2); child.setCreateTime(new Date()); child.setOrderType(commonOrder.getSourceType()); if (child.getMoney() == null) - return null; - if (child.getMoney().compareTo(new BigDecimal(0)) <= 0 && userLevel == UserLevelEnum.daRen) return null; return child; } @@ -748,19 +745,19 @@ return hongBao; } - private HongBaoV2 createFanLiUpdateHongBao(CommonOrder commonOrder, BigDecimal fanliRate, Long hongBaoId, + private HongBaoV2 createFanLiUpdateHongBao(CommonOrder commonOrder, BigDecimal money, Long hongBaoId, boolean mianDan) throws HongBaoException, UserAccountException { HongBaoV2 hongBao = new HongBaoV2(hongBaoId); hongBao.setUpdateTime(new Date()); + hongBao.setMoney(money); // 鏇存敼鐘舵�佷笌璧勯噾 if (commonOrder.getState() == CommonOrder.STATE_FK) { hongBao.setState(HongBaoV2.STATE_BUKELINGQU); - hongBao.setMoney(MoneyBigDecimalUtil.mul(commonOrder.getEstimate(), fanliRate.divide(new BigDecimal(100)))); + if (mianDan) hongBao.setMoney(commonOrder.getPayment()); } else if (commonOrder.getState() == CommonOrder.STATE_JS || commonOrder.getState() == CommonOrder.STATE_WQ) { hongBao.setState(HongBaoV2.STATE_KELINGQU); - hongBao.setMoney(MoneyBigDecimalUtil.mul(commonOrder.geteIncome(), fanliRate.divide(new BigDecimal(100)))); if (commonOrder.getSourceType() == Constant.SOURCE_TYPE_PDD)// 鎷煎澶�15澶╄繃1涓皬鏃跺埌璐� hongBao.setPreGetTime(new Date( commonOrder.getSettleTime().getTime() + 1000 * 60 * 60 * 24 * 15L + 1000 * 60 * 60 * 1L)); @@ -787,17 +784,16 @@ * @throws HongBaoException * @throws UserAccountException */ - private HongBaoV2 createShareUpdateHongBao(CommonOrder commonOrder, BigDecimal fanliRate, Long hongBaoId) + private HongBaoV2 createShareUpdateHongBao(CommonOrder commonOrder, BigDecimal money, Long hongBaoId) throws HongBaoException, UserAccountException { HongBaoV2 hongBao = new HongBaoV2(hongBaoId); hongBao.setUpdateTime(new Date()); + hongBao.setMoney(money); // 鏇存敼鐘舵�佷笌璧勯噾 if (commonOrder.getState() == CommonOrder.STATE_FK) { hongBao.setState(HongBaoV2.STATE_BUKELINGQU); - hongBao.setMoney(MoneyBigDecimalUtil.mul(commonOrder.getEstimate(), fanliRate.divide(new BigDecimal(100)))); } else if (commonOrder.getState() == CommonOrder.STATE_JS || commonOrder.getState() == CommonOrder.STATE_WQ) { hongBao.setState(HongBaoV2.STATE_KELINGQU); - hongBao.setMoney(MoneyBigDecimalUtil.mul(commonOrder.geteIncome(), fanliRate.divide(new BigDecimal(100)))); Calendar calendar = Calendar.getInstance(); calendar.setTime(commonOrder.getSettleTime()); calendar.add(Calendar.MONTH, 1); -- Gitblit v1.8.0