From 0ec22dcf4fd9c4496e6f681e7fab89f56c6e4e8a Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期四, 02 四月 2020 14:45:20 +0800
Subject: [PATCH] vip 消息

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/user/integral/IntegralTaskRecordServiceImpl.java |   29 ++++++++++++-----------------
 1 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/integral/IntegralTaskRecordServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/integral/IntegralTaskRecordServiceImpl.java
index 7d23465..500a5d6 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/integral/IntegralTaskRecordServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/integral/IntegralTaskRecordServiceImpl.java
@@ -26,6 +26,7 @@
 import com.yeshi.fanli.entity.integral.IntegralTaskClass;
 import com.yeshi.fanli.entity.integral.IntegralTaskClass.UniqueKeyEnum;
 import com.yeshi.fanli.entity.integral.IntegralTaskRecord;
+import com.yeshi.fanli.entity.system.ConfigKeyEnum;
 import com.yeshi.fanli.exception.integral.IntegralTaskRecordException;
 import com.yeshi.fanli.exception.user.UserInfoExtraException;
 import com.yeshi.fanli.log.LogHelper;
@@ -253,7 +254,7 @@
 		return totalGoldCoin + (userInfoExtra.getGoldCoin() == null ? 0 : userInfoExtra.getGoldCoin());
 	}
 
-	@Transactional(rollbackFor=Exception.class)
+	@Transactional(rollbackFor = Exception.class)
 	public boolean addDetail(Long uid, IntegralTaskRecord record) throws IntegralTaskRecordException {
 		Long uid2 = record.getUid();
 		if (uid2 == null || uid.longValue() != uid2.longValue())
@@ -351,7 +352,7 @@
 		return integralTaskRecordMapper.countGetCountByTaskIdAndDay(taskId, uid, minTime, maxTime);
 	}
 
-	@Transactional(rollbackFor=Exception.class)
+	@Transactional(rollbackFor = Exception.class)
 	@Override
 	public IntegralTaskRecord addRecord(IntegralTaskRecord record) throws IntegralTaskRecordException {
 		if (record == null)
@@ -370,15 +371,6 @@
 		// 璁剧疆鏈夋晥鏈�
 		record.setEndTime(DateUtil.plusDayDate(Constant.GOLD_COIN_VALID_DAYS, date));
 		integralTaskRecordMapper.insertSelective(record);
-		
-//		long count = integralTaskRecordMapper.getTotalGoldCoinByUid(record.getUid());
-//		if (count >= 200) {// 澶т簬200鍙戦�佹秷鎭�
-//			IntegralTaskMQMsg msg = new IntegralTaskMQMsg(record.getUid(), count, new Date());
-//			Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.integralTaskFinish,
-//					msg);
-//			producer.send(message);
-//		}
-
 		return record;
 	}
 
@@ -406,7 +398,7 @@
 		if (uid == null || originUid == null)
 			return;
 
-		String reward = configService.get("first_order_reward_boss");
+		String reward = configService.get(ConfigKeyEnum.firstOrderRewardBoss.getKey());
 		if (StringUtil.isNullOrEmpty(reward))
 			return;
 		firstOrderReward(uid, originUid, Integer.parseInt(reward), "涓�", beizu);
@@ -418,7 +410,7 @@
 		if (uid == null || originUid == null)
 			return;
 
-		String reward = configService.get("first_order_reward_boss_super");
+		String reward = configService.get(ConfigKeyEnum.firstOrderRewardBossSuper.getKey());
 		if (StringUtil.isNullOrEmpty(reward))
 			return;
 		firstOrderReward(uid, originUid, Integer.parseInt(reward), "浜�", beizu);
@@ -430,7 +422,7 @@
 		if (uid == null)
 			return;
 
-		String reward = configService.get("first_share_order_reward");
+		String reward = configService.get(ConfigKeyEnum.firstShareOrderReward.getKey());
 		if (StringUtil.isNullOrEmpty(reward))
 			return;
 		firstOrderReward(uid, null, Integer.parseInt(reward), null, beizu);
@@ -442,7 +434,7 @@
 		if (uid == null || originUid == null)
 			return;
 
-		String reward = configService.get("first_share_order_reward_boss");
+		String reward = configService.get(ConfigKeyEnum.firstShareOrderRewardBoss.getKey());
 		if (StringUtil.isNullOrEmpty(reward))
 			return;
 		firstOrderReward(uid, originUid, Integer.parseInt(reward), "涓�", beizu);
@@ -507,8 +499,11 @@
 			msgOther.setSource("棣栫瑪鍒嗕韩璁㈠崟锛岀郴缁熷鍔遍噾甯� ");
 			msgOther.setExplain("棣栫瑪鍒嗕韩璁㈠崟寰楀埌鐨勫閲戜笉瓒�0.01鍏冩椂濂栧姳 ");
 		} else {
-			msgOther.setSource(level + "绾ч槦鍛橀娆′笅鍗曪紝绯荤粺濂栧姳閲戝竵 ");
-			msgOther.setExplain("浠呮柊閭�璇烽槦鍛橀涓嬪崟浣犲緱鍒扮殑濂栭噾涓嶈冻0.01鍏冩椂濂栧姳 ");
+			if (level.equalsIgnoreCase("涓�") || level.equalsIgnoreCase("1"))
+				msgOther.setSource("鐩存帴绮変笣棣栨涓嬪崟锛岀郴缁熷鍔遍噾甯� ");
+			else
+				msgOther.setSource("闂存帴绮変笣棣栨涓嬪崟锛岀郴缁熷鍔遍噾甯� ");
+			msgOther.setExplain("浠呮柊閭�璇风矇涓濋涓嬪崟浣犲緱鍒扮殑濂栭噾涓嶈冻0.01鍏冩椂濂栧姳 ");
 		}
 		userOtherMsgNotificationService.firstOrderRewardMsg(uid, null, msgOther);
 	}

--
Gitblit v1.8.0