Showing
1 changed file
with
4 additions
and
2 deletions
@@ -669,8 +669,8 @@ public class GrassArticleServiceImpl implements IGrassArticleService { | @@ -669,8 +669,8 @@ public class GrassArticleServiceImpl implements IGrassArticleService { | ||
669 | Integer authStatus = req.getAuthStatus(); | 669 | Integer authStatus = req.getAuthStatus(); |
670 | Integer articleId = req.getArticleId(); | 670 | Integer articleId = req.getArticleId(); |
671 | //后期增加--文章有可能被删除,校验下 | 671 | //后期增加--文章有可能被删除,校验下 |
672 | - GrassArticle oldGrassArticle = grassArticleDao.selectByPrimaryKey(articleId); | ||
673 | - if(oldGrassArticle == null || oldGrassArticle.getAuthStatus() == 3){ | 672 | +// GrassArticle oldGrassArticle = grassArticleDao.selectByPrimaryKey(articleId); |
673 | + if(articleInfo == null || articleInfo.getAuthStatus() == 3){ | ||
674 | throw new PlatformException("article has been deleted",405); | 674 | throw new PlatformException("article has been deleted",405); |
675 | } | 675 | } |
676 | GrassArticle grassArticle = new GrassArticle(); | 676 | GrassArticle grassArticle = new GrassArticle(); |
@@ -683,6 +683,8 @@ public class GrassArticleServiceImpl implements IGrassArticleService { | @@ -683,6 +683,8 @@ public class GrassArticleServiceImpl implements IGrassArticleService { | ||
683 | grassArticle.setRecommendTime(0L); | 683 | grassArticle.setRecommendTime(0L); |
684 | grassArticle.setTopTime(0L); | 684 | grassArticle.setTopTime(0L); |
685 | } | 685 | } |
686 | + req.setPublishTime(articleInfo.getCreateTime()+""); | ||
687 | + | ||
686 | grassArticle.setAuthorizeAccount(req.getAuthorizeAccount()); | 688 | grassArticle.setAuthorizeAccount(req.getAuthorizeAccount()); |
687 | grassArticle.setAuthTime(System.currentTimeMillis()); | 689 | grassArticle.setAuthTime(System.currentTimeMillis()); |
688 | grassArticleDao.updateByPrimaryKeySelective(grassArticle); | 690 | grassArticleDao.updateByPrimaryKeySelective(grassArticle); |
-
Please register or login to post a comment