Commit 185ac902 by 吴迪

【新增】修改文件

parent ecb3b3a4
......@@ -49,7 +49,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
news.setStartdate(new Date());
news.setPublicdate(new Date());
//二级栏目不为空时 classid取值二级栏目id值
if (news.getCclassid() != null) {
if (news.getCclassid() != null&&StringUtils.isNotBlank(news.getCclassid().toString())) {
news.setClassid(news.getCclassid());
}
int insert = baseMapper.insert(news);
......@@ -65,6 +65,10 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
if (news.getId() == null) {
return R.error("id不能为空!");
}
if(news.getCclassid()!=null&&StringUtils.isNotBlank(news.getCclassid().toString())){
news.setClassid(news.getCclassid());
}
QueryWrapper<NewsEntity> newsEntityQueryWrapper = new QueryWrapper<>();
newsEntityQueryWrapper.eq("id", news.getId());
news.setEditor(user.getUsername());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment