From 0a63d22e38a644bc83b393ed85618b04d3be858b Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期五, 03 一月 2020 12:22:30 +0800
Subject: [PATCH] Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div
---
fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java | 26 ++++++++++++++++++++------
1 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java b/fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java
index 751df38..29d9980 100644
--- a/fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java
+++ b/fanli/src/main/java/com/yeshi/fanli/util/SpringContext.java
@@ -162,7 +162,7 @@
doTaoBaoOrders();// 澶勭悊娣樺疂璁㈠崟
doTaoBaoNewOrders();// 澶勭悊娣樺疂璁㈠崟锛堝垰鍒氫骇鐢熺殑锛�
doOrderFanLiNew();// 鏂扮増杩斿埄
- doOrderTiChengFanLi();// 澶勭悊璁㈠崟鎻愭垚杩斿埄
+// doOrderTiChengFanLi();// 澶勭悊璁㈠崟鎻愭垚杩斿埄
doWeiQuanOrder();// 澶勭悊缁存潈璁㈠崟
doPushIOS();// 澶勭悊鍙戦�両OS娑堟伅
doUserMoneyDebtJob();// 鍊哄姟鍋胯繕
@@ -327,7 +327,7 @@
try {
HongBaoV2 hongbao = map.get(handler);
if (hongbao != null) {
- String key = "hongbao-fanli-" + hongbao.getId();
+ String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.hongBaoFanLi, hongbao.getId() + "");
if (StringUtil.isNullOrEmpty(redisManager.getCommonString(key))) {
// 澶勭悊涔嬪悗瑕侀殧2灏忔椂鍐嶆杩涜澶勭悊
redisManager.cacheCommonString(key, "1", 60 * 60 * 2);
@@ -840,14 +840,28 @@
private void fanliGetIntegral(HongBaoV2 hongBaoV2) {
if (hongBaoV2 != null && hongBaoV2.getState() == HongBaoV2.STATE_YILINGQU
&& hongBaoV2.getMoney().compareTo(new BigDecimal(0)) > 0) {
+ // 鏌ヨ瀵瑰簲鐨勮鍗曞彿
+ Long mainHongBaoId = hongBaoV2.getId();
+ if (hongBaoV2.getParent() != null && hongBaoV2.getParent().getId() != null)
+ mainHongBaoId = hongBaoV2.getParent().getId();
+
+ HongBaoOrder hongbaoOrder = hongBaoOrderService.selectDetailByHongBaoId(mainHongBaoId);
+ if (hongbaoOrder == null || hongbaoOrder.getCommonOrder() == null)
+ return;
+ CommonOrder commonOrder = hongbaoOrder.getCommonOrder();
+
if (hongBaoV2.getType() == HongBaoV2.TYPE_ZIGOU) {// 鑷喘璁㈠崟
- integralGetService.addRebateOrder(hongBaoV2.getUserInfo().getId());
+ integralGetService.addRebateOrder(hongBaoV2.getUserInfo().getId(), commonOrder.getOrderNo(),
+ commonOrder.getSourceType());
} else if (hongBaoV2.getType() == HongBaoV2.TYPE_SHARE_GOODS) {// 鍒嗕韩璁㈠崟
- integralGetService.addShareOrder(hongBaoV2.getUserInfo().getId());
+ integralGetService.addShareOrder(hongBaoV2.getUserInfo().getId(), commonOrder.getOrderNo(),
+ commonOrder.getSourceType());
} else if (hongBaoV2.getType() == HongBaoV2.TYPE_YIJI || hongBaoV2.getType() == HongBaoV2.TYPE_SHARE_YIJI) {// 涓�绾ч個璇�
- integralGetService.addInviteOrderLevelOne(hongBaoV2.getUserInfo().getId());
+ integralGetService.addInviteOrderLevelOne(hongBaoV2.getUserInfo().getId(), commonOrder.getOrderNo(),
+ commonOrder.getSourceType());
} else if (hongBaoV2.getType() == HongBaoV2.TYPE_ERJI || hongBaoV2.getType() == HongBaoV2.TYPE_SHARE_ERJI) {// 浜岀骇閭�璇�
- integralGetService.addInviteOrderLevelTwo(hongBaoV2.getUserInfo().getId());
+ integralGetService.addInviteOrderLevelTwo(hongBaoV2.getUserInfo().getId(), commonOrder.getOrderNo(),
+ commonOrder.getSourceType());
}
}
}
--
Gitblit v1.8.0