From 52f78c29b978f65cc704be546c814509fbe90cda Mon Sep 17 00:00:00 2001 From: Administrator <Administrator@CI6BUF61FT24H5M> Date: 星期日, 21 七月 2019 11:38:12 +0800 Subject: [PATCH] 查询用户淘宝授权信息禁止查询缓存 --- fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java | 37 ++++++++++++++++++++++++++++--------- 1 files changed, 28 insertions(+), 9 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java index 361a7c3..9a07365 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoV2ServiceImpl.java @@ -183,8 +183,6 @@ BigDecimal money = notify.getMoney(); switch (t) { case HongBaoV2.TYPE_ZIGOU: - userNotificationService.orderFanliStatisticed(uid, orderId, goodsCount, MsgOrderDetail.STATE_FK, - null, money); userOrderMsgNotificationService.orderFanLiStatistic(uid, orderId, commonOrder.getPayment(), money, goodsCount, state); break; @@ -589,21 +587,23 @@ if (notificationMap.get(child.getType()) == null) { HongBaoV2 tempHongBao = new HongBaoV2(child.getId()); tempHongBao.setUserInfo(child.getUserInfo()); - tempHongBao.setMoney(childUpdate.getMoney()); + tempHongBao + .setMoney(childUpdate.getMoney() == null ? new BigDecimal(0) : childUpdate.getMoney()); CommonOrder tempCommonOrder = new CommonOrder(commonOrder.getId()); tempCommonOrder.setPayment(commonOrder.getPayment()); notificationMap.put(child.getType(), new HongBaoOrder(tempCommonOrder, tempHongBao)); } else { // 澧炲姞浠樻閲戦涓庤祫閲� HongBaoOrder tempHongBaoOrder = notificationMap.get(child.getType()); - tempHongBaoOrder.getCommonOrder().setPayment( - tempHongBaoOrder.getCommonOrder().getPayment().add(commonOrder.getPayment())); - tempHongBaoOrder.getHongBaoV2() - .setMoney(tempHongBaoOrder.getHongBaoV2().getMoney().add(childUpdate.getMoney())); + if (commonOrder.getPayment() != null) + tempHongBaoOrder.getCommonOrder().setPayment( + tempHongBaoOrder.getCommonOrder().getPayment().add(commonOrder.getPayment())); + if (childUpdate.getMoney() != null) + tempHongBaoOrder.getHongBaoV2() + .setMoney(tempHongBaoOrder.getHongBaoV2().getMoney().add(childUpdate.getMoney())); notificationMap.put(child.getType(), tempHongBaoOrder); } - - + } } else throw new HongBaoException(2, "type閿欒"); @@ -729,6 +729,10 @@ firstHongbao.setMoney( MoneyBigDecimalUtil.mul(hongBao.getMoney(), firstRate.divide(new BigDecimal(100)))); } + // 杩斿埄涓�0鐨勪笉閫氱煡 + if (firstHongbao.getMoney() == null || firstHongbao.getMoney().compareTo(new BigDecimal(0)) <= 0) + return; + hongBaoV2Mapper.insertSelective(firstHongbao); // 鐢ㄦ埛閫氱煡 if (notificationMap.get(HongBaoV2.TYPE_YIJI) == null) { @@ -776,6 +780,11 @@ secondHongbao.setMoney( MoneyBigDecimalUtil.mul(hongBao.getMoney(), secondRate.divide(new BigDecimal(100)))); } + + // 杩斿埄涓�0鐨勪笉缁熻 + if (secondHongbao.getMoney() == null || secondHongbao.getMoney().compareTo(new BigDecimal(0)) <= 0) + return; + hongBaoV2Mapper.insertSelective(secondHongbao); // 鐢ㄦ埛閫氱煡 @@ -1023,4 +1032,14 @@ else return money; } + + @Override + public List<HongBaoV2> listChildrenById(Long id) { + return hongBaoV2Mapper.listChildrenById(id); + } + + @Override + public List<Long> getUidByNear30DayShareSucceed() { + return hongBaoV2Mapper.getUidByNear30DayShareSucceed(); + } } -- Gitblit v1.8.0