|
@@ -187,6 +187,9 @@ public class NewsArticleServiceImpl extends BaseService implements NewsArticleSe
|
|
|
if (!StringUtils.isBlank(newsArticleDto.getContent())) {
|
|
|
newsArticlePo.setContent(newsArticleDto.getContent());
|
|
|
}
|
|
|
+ if (newsArticleDto.getTopFlag() != null) {
|
|
|
+ newsArticlePo.setTopFlag(newsArticleDto.getTopFlag());
|
|
|
+ }
|
|
|
if (newsArticleDto.getPhoto() != null) {
|
|
|
try {
|
|
|
photoService.deletePhoto(newsArticlePo.getPhotoId());
|
|
@@ -203,6 +206,7 @@ public class NewsArticleServiceImpl extends BaseService implements NewsArticleSe
|
|
|
throw new ServiceException("更换新闻封面图失败");
|
|
|
}
|
|
|
}
|
|
|
+ newsArticlePo.setUpdateTime(new Date());
|
|
|
newsArticlePo.setPhotoUrl(null);
|
|
|
mapper.updateById(newsArticlePo);
|
|
|
} catch (Exception e) {
|