Authored by 张帅

奖励活动fix

@@ -1971,6 +1971,10 @@ public class GrassArticleServiceImpl implements IGrassArticleService { @@ -1971,6 +1971,10 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
1971 logger.info("sendPublishReward reward send times reach maxtimes, rewardId is {}, articleId is {}, uid is {}",grassRewardsConfig.getId(), articleId, uid); 1971 logger.info("sendPublishReward reward send times reach maxtimes, rewardId is {}, articleId is {}, uid is {}",grassRewardsConfig.getId(), articleId, uid);
1972 return; 1972 return;
1973 } 1973 }
  1974 + if(grassRewardsConfig.getMaxTime() == 0){
  1975 + logger.info("sendPublishReward reward maxtimes is 0, rewardId is {}",grassRewardsConfig.getId());
  1976 + return ;
  1977 + }
1974 callSnsSendReward(articleId, grassRewardsConfig.getId(), 1, uid); 1978 callSnsSendReward(articleId, grassRewardsConfig.getId(), 1, uid);
1975 }catch (Exception e){ 1979 }catch (Exception e){
1976 logger.warn("sendPublishReward error, articleId is {}, e is {}", articleId, e); 1980 logger.warn("sendPublishReward error, articleId is {}, e is {}", articleId, e);
@@ -2057,6 +2061,10 @@ public class GrassArticleServiceImpl implements IGrassArticleService { @@ -2057,6 +2061,10 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
2057 logger.info("sendTopicReward reward send times reach maxtimes, rewardId is {}, articleId is {},uid is {}",rewardsConfig.getId(), articleId, uid); 2061 logger.info("sendTopicReward reward send times reach maxtimes, rewardId is {}, articleId is {},uid is {}",rewardsConfig.getId(), articleId, uid);
2058 return false; 2062 return false;
2059 } 2063 }
  2064 + if(rewardsConfig.getMaxTime() == 0){
  2065 + logger.info("sendTopicReward reward maxtimes is 0, rewardId is {}",rewardsConfig.getId());
  2066 + return false;
  2067 + }
2060 callSnsSendReward(articleId, rewardsConfig.getId(), 2, uid); 2068 callSnsSendReward(articleId, rewardsConfig.getId(), 2, uid);
2061 hasSend = true; 2069 hasSend = true;
2062 }catch (Exception e){ 2070 }catch (Exception e){
@@ -2101,6 +2109,10 @@ public class GrassArticleServiceImpl implements IGrassArticleService { @@ -2101,6 +2109,10 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
2101 logger.info("sendFirstPublishReward reward send times reach maxtimes, rewardId is {}, articleId is {}, uid is {}",grassRewardsConfig.getId(), articleId, uid); 2109 logger.info("sendFirstPublishReward reward send times reach maxtimes, rewardId is {}, articleId is {}, uid is {}",grassRewardsConfig.getId(), articleId, uid);
2102 return; 2110 return;
2103 } 2111 }
  2112 + if(grassRewardsConfig.getMaxTime() == 0){
  2113 + logger.info("sendTopicReward reward maxtimes is 0, rewardId is {}",grassRewardsConfig.getId());
  2114 + return ;
  2115 + }
2104 callSnsSendReward(articleId, grassRewardsConfig.getId(), 3, uid); 2116 callSnsSendReward(articleId, grassRewardsConfig.getId(), 3, uid);
2105 }catch (Exception e){ 2117 }catch (Exception e){
2106 logger.warn("sendFirstPublishReward error, articleId is {}, e is {}", articleId, e); 2118 logger.warn("sendFirstPublishReward error, articleId is {}, e is {}", articleId, e);