|
|
@@ -321,18 +321,7 @@ public class NewsService extends BaseMybatisDao<NewsMapper> {
|
|
|
|
|
|
return newsMapper.portalNewsQuestion();
|
|
|
}
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
- public Pagination<AppDiscoveryBo> appListinformation( Integer pNo,Integer pSize){
|
|
|
- Map<String, Object> params=new HashMap<>();
|
|
|
- if (pNo == null || pNo < 1)pNo = 1;
|
|
|
- if (pSize == null || pSize < 1 )pSize = 10;
|
|
|
- Pagination<AppDiscoveryBo>p=(Pagination<AppDiscoveryBo>) findPage("appNewsList", "appNewsCount", params, pNo, pSize);
|
|
|
- List<AppDiscoveryBo> l=(List<AppDiscoveryBo>) p.getList();
|
|
|
- for (AppDiscoveryBo a : l) {
|
|
|
- a.setContent(a.getContent().replaceAll("<p>", "").replaceAll("</p>", ""));
|
|
|
- }
|
|
|
- return p;
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
public int deleteByPrimaryKey(long id) {
|
|
|
newsPublishMapper.deleteByNewsId(id);
|
|
|
@@ -355,18 +344,7 @@ public class NewsService extends BaseMybatisDao<NewsMapper> {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
- public Pagination<AppDiscoveryBo> listEncyclopedia(Integer pageNo, Integer pageSize) {
|
|
|
- Map<String, Object> params=new HashMap<>();
|
|
|
- if (pageNo == null || pageNo < 1)pageNo = 1;
|
|
|
- if (pageSize == null || pageSize < 1 )pageSize = 10;
|
|
|
- Pagination<AppDiscoveryBo>p= (Pagination<AppDiscoveryBo>) findPage("encyclopediaList", "encyclopediaCount", params, pageNo, pageSize);
|
|
|
- List<AppDiscoveryBo> l=(List<AppDiscoveryBo>) p.getList();
|
|
|
- for (AppDiscoveryBo a : l) {
|
|
|
- a.setContent(a.getContent().replaceAll("<p>", "").replaceAll("</p>", ""));
|
|
|
- }
|
|
|
- return p;
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
public News findAppNewsDetail(long id) {
|
|
|
return newsMapper.selectByPrimaryKey(id);
|
|
|
@@ -393,6 +371,20 @@ public class NewsService extends BaseMybatisDao<NewsMapper> {
|
|
|
if(collectFlag)jtCollectSearchMapper.deleteByrowId(news.getId().toString());
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
+ public Pagination<AppDiscoveryBo> listTypeNews(Integer type,Integer pageNo, Integer pageSize) {
|
|
|
+ Map<String, Object> params=new HashMap<>();
|
|
|
+ if (pageNo == null || pageNo < 1)pageNo = 1;
|
|
|
+ if (pageSize == null || pageSize < 1 )pageSize = 10;
|
|
|
+ if(type!=null)params.put("type", type);
|
|
|
+ Pagination<AppDiscoveryBo>p= (Pagination<AppDiscoveryBo>) findPage("selectTypeNewsList", "selectTypeNewsCount", params, pageNo, pageSize);
|
|
|
+ List<AppDiscoveryBo> l=(List<AppDiscoveryBo>) p.getList();
|
|
|
+ for (AppDiscoveryBo a : l) {
|
|
|
+ a.setContent(a.getContent().replaceAll("<p>", "").replaceAll("</p>", ""));
|
|
|
+ }
|
|
|
+ return p;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|