From d28bed1a1275131a5ca37f7da37961e2b518ac07 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期一, 26 八月 2019 13:44:00 +0800 Subject: [PATCH] 淘礼金创建异常处理 --- 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