|
@@ -128,6 +128,7 @@ public class NewsArticleServiceImpl extends BaseService implements NewsArticleSe
|
|
|
BeanUtil.copyProperties(newsArticlePo, newsArticleDto);
|
|
|
newsArticlePo.setCreateTime(new Date());
|
|
|
newsArticlePo.setPhotoId(photoVo.getId());
|
|
|
+ newsArticlePo.setPublishTime(new Date());
|
|
|
try {
|
|
|
mapper.insert(newsArticlePo);
|
|
|
} catch (Exception e) {
|
|
@@ -190,6 +191,12 @@ public class NewsArticleServiceImpl extends BaseService implements NewsArticleSe
|
|
|
if (newsArticleDto.getTopFlag() != null) {
|
|
|
newsArticlePo.setTopFlag(newsArticleDto.getTopFlag());
|
|
|
}
|
|
|
+ if (newsArticleDto.getAuthor() != null) {
|
|
|
+ newsArticlePo.setAuthor(newsArticleDto.getAuthor());
|
|
|
+ }
|
|
|
+ if (newsArticleDto.getSource() != null) {
|
|
|
+ newsArticlePo.setSource(newsArticleDto.getSource());
|
|
|
+ }
|
|
|
if (newsArticleDto.getPhoto() != null) {
|
|
|
try {
|
|
|
photoService.deletePhoto(newsArticlePo.getPhotoId());
|