Commit 5f0db7bc by rongkailun

保存

parent 26abc8dc
...@@ -6,9 +6,13 @@ import io.office.common.utils.R; ...@@ -6,9 +6,13 @@ import io.office.common.utils.R;
import io.office.modules.manage.dao.TopicnewsDao; import io.office.modules.manage.dao.TopicnewsDao;
import io.office.modules.manage.entity.NewsEntity; import io.office.modules.manage.entity.NewsEntity;
import io.office.modules.manage.entity.TopicnewsEntity; import io.office.modules.manage.entity.TopicnewsEntity;
import io.office.modules.manage.service.NewsService;
import io.office.modules.manage.service.TopicnewsService; import io.office.modules.manage.service.TopicnewsService;
import io.office.modules.sys.entity.SysUserEntity; import io.office.modules.sys.entity.SysUserEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.Map; import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
...@@ -28,9 +32,19 @@ public class TopicnewsServiceImpl extends ServiceImpl<TopicnewsDao, TopicnewsEnt ...@@ -28,9 +32,19 @@ public class TopicnewsServiceImpl extends ServiceImpl<TopicnewsDao, TopicnewsEnt
return new PageUtils(page); return new PageUtils(page);
} }
@Autowired
private NewsService newsService;
@Override @Override
public R insertHdbd(NewsEntity news, SysUserEntity user) { public R insertHdbd(NewsEntity news, SysUserEntity user) {
return null; news.setCclassid(35);
newsService.insertNews(news,user);
TopicnewsEntity topicnewsEntity = new TopicnewsEntity();
topicnewsEntity.setClassid(428);
topicnewsEntity.setNewsid(news.getId());
topicnewsEntity.setNewslevels(news.getLevels());
topicnewsEntity.setTime(new Date());
baseMapper.insert(topicnewsEntity);
return R.ok("新增成功!");
} }
} }
\ No newline at end of file
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