From 2012b3b5db3c6b06535a68f775bcc81b16151b90 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 06 九月 2019 16:54:00 +0800 Subject: [PATCH] 加入任务 --- fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralGetServiceImpl.java | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralGetServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralGetServiceImpl.java index e41be32..aeb29f0 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralGetServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralGetServiceImpl.java @@ -13,9 +13,9 @@ import com.yeshi.fanli.entity.bus.user.UserInfoExtra; import com.yeshi.fanli.entity.bus.user.UserRank; import com.yeshi.fanli.entity.integral.IntegralTask; -import com.yeshi.fanli.entity.integral.IntegralTaskRank; import com.yeshi.fanli.entity.integral.IntegralTask.FrequencyEnum; import com.yeshi.fanli.entity.integral.IntegralTask.TaskUniqueKeyEnum; +import com.yeshi.fanli.entity.integral.IntegralTaskRank; import com.yeshi.fanli.entity.integral.IntegralTaskRecord; import com.yeshi.fanli.exception.integral.IntegralGetException; import com.yeshi.fanli.exception.integral.IntegralTaskRecordException; @@ -44,10 +44,10 @@ @Resource private RedisManager redisManager; - + @Resource private UserInfoExtraService userInfoExtraService; - + @Resource private IntegralTaskRankService integralTaskRankService; @@ -79,19 +79,19 @@ if (count > 0) throw new IntegralGetException(2, "浜嬩欢瑙﹀彂杈惧埌涓婇檺"); } - + UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid); if (userInfoExtra == null) throw new IntegralGetException(2, "棰濆淇℃伅涓嶅瓨鍦�"); - + UserRank userRank = userInfoExtra.getUserRank(); if (userRank == null) - throw new IntegralGetException(2,"绛夌骇淇℃伅涓嶅瓨鍦�"); + throw new IntegralGetException(2, "绛夌骇淇℃伅涓嶅瓨鍦�"); int goldCoin = task.getGoldCoin(); if (task.getDoubleNum() != null && task.getDoubleNum() > 0) goldCoin = task.getDoubleNum() * goldCoin; - + Long taskId = task.getId(); IntegralTaskRank traskRank = integralTaskRankService.getByTsakIdAndRankId(taskId, userRank.getId()); if (traskRank != null) { @@ -142,8 +142,8 @@ return null; } - - @IntegralGetFrequencyLimit(key = "'addShareInvite-'+#uid") + + @IntegralGetFrequencyLimit(key = "'addShareInvite-'+#uid", time = 30) @Override public IntegralTaskRecord addShareInvite(Long uid) { try { @@ -246,6 +246,7 @@ } @IntegralGetVersionLimit(uid = "#uid") + @IntegralGetFrequencyLimit(key = "'taoLiJinBuy-'+#uid", time = 30) @Async() @Override public void addTaoLiJinBuy(Long uid, Long goodsId) { @@ -287,6 +288,7 @@ } @IntegralGetVersionLimit(uid = "#uid") + @IntegralGetFrequencyLimit(key = "'shareSingleGoods-'+#uid", time = 45) @Async() @Override public void addShareSingleGoods(Long uid) { @@ -298,6 +300,7 @@ } @IntegralGetVersionLimit(uid = "#uid") + @IntegralGetFrequencyLimit(key = "'shareMultipleGoods-'+#uid", time = 45) @Async() @Override public void addShareMultipleGoods(Long uid) { @@ -309,6 +312,7 @@ } @IntegralGetVersionLimit(uid = "#uid") + @IntegralGetFrequencyLimit(key = "'shareTLJGoods-'+#uid", time = 45) @Async() @Override public void addShareTLJGoods(Long uid) { @@ -353,6 +357,7 @@ } @IntegralGetVersionLimit(uid = "#uid") + @IntegralGetFrequencyLimit(key = "'closeRecommendGoods-'+#uid", time = 30) @Async() @Override public void addCloseRecommendGoods(Long uid) { @@ -364,6 +369,7 @@ } @IntegralGetVersionLimit(uid = "#uid") + @IntegralGetFrequencyLimit(key = "'couponRebate-'+#uid", time = 30) @Async() @Override public void addCouponRebate(Long uid) { -- Gitblit v1.8.0