Authored by 张帅

优化晒单推荐奖励发放,解决发放失败bug

@@ -557,10 +557,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService { @@ -557,10 +557,7 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
557 } 557 }
558 grassArticle.setIsRecommend(isRecommend); 558 grassArticle.setIsRecommend(isRecommend);
559 grassArticle.setRecommendTime(System.currentTimeMillis()); 559 grassArticle.setRecommendTime(System.currentTimeMillis());
560 - //后期新加的逻辑 发奖励-- 1)晒单的文章2)被推荐 3)没有发放过奖励  
561 - if (isRecommend == 1 && articleInfo.getArticleType() == 4 && articleInfo.getRemRewardFlag() == 0) {  
562 - sendRemReward(articleInfo);  
563 - } 560 +
564 //Add 从没推荐到推荐,发送站内信通知 561 //Add 从没推荐到推荐,发送站内信通知
565 if (isRecommend == 1 && articleInfo.getIsRecommend() == 0) { 562 if (isRecommend == 1 && articleInfo.getIsRecommend() == 0) {
566 //文章推荐站内信通知只发送一次 发送过不会再发送 563 //文章推荐站内信通知只发送一次 发送过不会再发送
@@ -598,6 +595,10 @@ public class GrassArticleServiceImpl implements IGrassArticleService { @@ -598,6 +595,10 @@ public class GrassArticleServiceImpl implements IGrassArticleService {
598 grassArticleDao.updateByPrimaryKeySelective(grassArticle); 595 grassArticleDao.updateByPrimaryKeySelective(grassArticle);
599 //推荐和置顶操作,清前台缓存 596 //推荐和置顶操作,清前台缓存
600 clearArticleListCache(req.getArticleId()); 597 clearArticleListCache(req.getArticleId());
  598 + //后期新加的逻辑 发奖励-- 1)晒单的文章2)被推荐 3)没有发放过奖励
  599 + if (isRecommend == 1 && articleInfo.getArticleType() == 4 && articleInfo.getRemRewardFlag() == 0) {
  600 + sendRemReward(articleInfo);
  601 + }
601 } 602 }
602 //编辑文章 603 //编辑文章
603 if (type == 1) { 604 if (type == 1) {