Commit 59455424 by rongkailun

【新增】党办文化新增

parent 1dbb9fe3
...@@ -37,6 +37,7 @@ public class TopicnewsController extends AbstractController { ...@@ -37,6 +37,7 @@ public class TopicnewsController extends AbstractController {
@RequestMapping("/list") @RequestMapping("/list")
// @RequiresPermissions("generator:topicnews:list") // @RequiresPermissions("generator:topicnews:list")
public R list(@RequestBody NewsParams newsParams){ public R list(@RequestBody NewsParams newsParams){
newsParams.setClassId(428);
Page<NewsEntity> page = this.topicnewsService.selectTopicList(newsParams, Page<NewsEntity> page = this.topicnewsService.selectTopicList(newsParams,
new Page(newsParams.getPage(),newsParams.getLimit())); new Page(newsParams.getPage(),newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page); PageUtils pageUtils = new PageUtils(page);
...@@ -62,6 +63,7 @@ public class TopicnewsController extends AbstractController { ...@@ -62,6 +63,7 @@ public class TopicnewsController extends AbstractController {
// @RequiresPermissions("generator:topicnews:save") // @RequiresPermissions("generator:topicnews:save")
public R save(@RequestBody NewsEntity news){ public R save(@RequestBody NewsEntity news){
try { try {
news.setClassid(428);
R r = this.topicnewsService.insertHdbd(news, getUser()); R r = this.topicnewsService.insertHdbd(news, getUser());
return r; return r;
} catch (Exception e) { } catch (Exception e) {
...@@ -128,5 +130,15 @@ public class TopicnewsController extends AbstractController { ...@@ -128,5 +130,15 @@ public class TopicnewsController extends AbstractController {
} }
} }
@Login
@PostMapping("/api/getHdbdList")
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public R getHdbdList(@RequestBody NewsParams newsParams) {
Page<NewsEntity> page = this.topicnewsService.getHdbdList(newsParams,
new Page(newsParams.getPage(),newsParams.getLimit()));
PageUtils pageUtils = new PageUtils(page);
return R.ok().put("page", pageUtils);
}
} }
...@@ -31,4 +31,6 @@ public interface NewsDao extends BaseMapper<NewsEntity> { ...@@ -31,4 +31,6 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
List<NewsEntity> selectNewsListCondition(@Param("newsEntity") NewsEntity newsEntity); List<NewsEntity> selectNewsListCondition(@Param("newsEntity") NewsEntity newsEntity);
List<NewsEntity> selectRealTimeInfo(@Param("newsParams")NewsParams newsParams, Page page); List<NewsEntity> selectRealTimeInfo(@Param("newsParams")NewsParams newsParams, Page page);
List<NewsEntity> getHdbdList(@Param("newsParams")NewsParams newsParams, Page page);
} }
...@@ -38,5 +38,6 @@ public interface TopicnewsService extends IService<TopicnewsEntity> { ...@@ -38,5 +38,6 @@ public interface TopicnewsService extends IService<TopicnewsEntity> {
List<TopicNewsPartyVo>getTopicNewsByCondition(TopicNewsPartyRequestVo topicNewsPartyRequestVo); List<TopicNewsPartyVo>getTopicNewsByCondition(TopicNewsPartyRequestVo topicNewsPartyRequestVo);
Page<NewsEntity> getHdbdList(NewsParams newsParams, Page page);
} }
...@@ -111,4 +111,11 @@ public class TopicnewsServiceImpl extends ServiceImpl<TopicnewsDao, TopicnewsEnt ...@@ -111,4 +111,11 @@ public class TopicnewsServiceImpl extends ServiceImpl<TopicnewsDao, TopicnewsEnt
return topicnewsDao.getTopicNewsByCondition(topicNewsPartyRequestVo); return topicnewsDao.getTopicNewsByCondition(topicNewsPartyRequestVo);
} }
@Override
public Page<NewsEntity> getHdbdList(NewsParams newsParams, Page page) {
List<NewsEntity> list = this.newsDao.getHdbdList(newsParams,page);
page.setRecords(list);
return page;
}
} }
\ No newline at end of file
...@@ -206,4 +206,29 @@ ...@@ -206,4 +206,29 @@
and t.status = '1' and t.status = '1'
order by t.levels desc,t.showtime desc ,t.id desc order by t.levels desc,t.showtime desc ,t.id desc
</select> </select>
<select id="getHdbdList" resultMap="newsMap">
SELECT t.id,
t.title,
t.author,
t.showtime,
t.startdate,
t.keyword,
t.editor,
t.lasteditor,
t.auditor,
t.status,
t1.classid,
t.levels,
t.releasedate,
t.updatedate
FROM TopIcNews t1
LEFT JOIN
news t
ON t1.NewsId = t.id
and t.levels > 0
and t.status = '1'
and t1.classid = #{newsParams.classId}
order by t.levels desc,t.showtime desc ,t.id desc
</select>
</mapper> </mapper>
\ 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