From d8359ddb48dab5cc797a9d552e11fde571f4920c Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期二, 27 八月 2019 12:32:46 +0800
Subject: [PATCH] Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoManageServiceImpl.java |   26 +++++++++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoManageServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoManageServiceImpl.java
index 4283b7c..8bf1220 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoManageServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/HongBaoManageServiceImpl.java
@@ -6,10 +6,10 @@
 import java.util.Map;
 
 import javax.annotation.Resource;
-import javax.transaction.Transactional;
 
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import com.yeshi.fanli.dao.mybatis.HongBaoManageMapper;
 import com.yeshi.fanli.entity.bus.user.HongBaoManage;
@@ -165,4 +165,28 @@
 		return new BigDecimal(0);
 	}
 
+	@Override
+	public BigDecimal getTLJFanLiRate() {
+		String key = "tlj_fanli_proportion";
+		HongBaoManage hongBaoManage = hongBaoManageMapper.selectByKeyAndMaxValidTime(key, System.currentTimeMillis());
+		if (hongBaoManage == null)
+			hongBaoManage = hongBaoManageMapper.selectByKey(key);
+		if (hongBaoManage != null)
+			return new BigDecimal(hongBaoManage.getValue());
+		LogHelper.error("鑾峰彇娣樼ぜ閲戣繑鍒╁垎鎴愭瘮渚嬪嚭閿�");
+		return null;
+	}
+
+	@Override
+	public BigDecimal getTLJShareRate(long time) {
+		String key = "tlj_share_proportion";
+		HongBaoManage hongBaoManage = hongBaoManageMapper.selectByKeyAndMaxValidTime(key, time);
+		if (hongBaoManage == null)
+			hongBaoManage = hongBaoManageMapper.selectByKey(key);
+		if (hongBaoManage != null)
+			return new BigDecimal(hongBaoManage.getValue());
+		LogHelper.error("鑾峰彇娣樼ぜ閲戝垎浜禋鍒嗘垚姣斾緥鍑洪敊");
+		return null;
+	}
+
 }

--
Gitblit v1.8.0