Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1-office-web-sit
Commits
4dce1cee
Commit
4dce1cee
authored
Dec 24, 2021
by
rongkailun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改】资讯中心重构接口
parent
2ba44fb2
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
170 additions
and
3 deletions
+170
-3
NewsController.java
...a/io/office/modules/manage/controller/NewsController.java
+67
-0
NewsDao.java
src/main/java/io/office/modules/manage/dao/NewsDao.java
+8
-0
NewsService.java
...in/java/io/office/modules/manage/service/NewsService.java
+8
-0
NewsServiceImpl.java
...o/office/modules/manage/service/impl/NewsServiceImpl.java
+29
-0
NewsDao.xml
src/main/resources/mapper/manage/NewsDao.xml
+58
-3
No files found.
src/main/java/io/office/modules/manage/controller/NewsController.java
View file @
4dce1cee
...
@@ -542,5 +542,72 @@ public class NewsController extends AbstractController {
...
@@ -542,5 +542,72 @@ public class NewsController extends AbstractController {
return
R
.
ok
().
put
(
"page"
,
pageUtils
);
return
R
.
ok
().
put
(
"page"
,
pageUtils
);
}
}
/***********************************资讯中心重构接口******************************************************/
/**
* 综合报道
*/
@Login
@RequestMapping
(
"/api/zhbdList"
)
// @RequiresPermissions("manage:product:findPage")
public
R
zhbdList
(
@RequestBody
NewsParams
newsParams
)
{
Page
<
NewsEntity
>
page
=
this
.
newsService
.
zhbdList
(
newsParams
,
new
Page
(
newsParams
.
getPage
(),
newsParams
.
getLimit
()));
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
/**
* 标准科研动态
*/
@Login
@RequestMapping
(
"/api/bzkydtList"
)
// @RequiresPermissions("manage:product:findPage")
public
R
bzkydtList
(
@RequestBody
NewsParams
newsParams
)
{
Page
<
NewsEntity
>
page
=
this
.
newsService
.
bzkydtList
(
newsParams
,
new
Page
(
newsParams
.
getPage
(),
newsParams
.
getLimit
()));
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
/**
* 深度专题
*/
@Login
@RequestMapping
(
"/api/sdztList"
)
// @RequiresPermissions("manage:product:findPage")
public
R
sdztList
(
@RequestBody
NewsParams
newsParams
)
{
Page
<
NewtopicEntity
>
page
=
this
.
newsService
.
sdztList
(
newsParams
,
new
Page
(
newsParams
.
getPage
(),
newsParams
.
getLimit
()));
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
/**
* 精彩视频
*/
@Login
@RequestMapping
(
"/api/jcspList"
)
// @RequiresPermissions("manage:product:findPage")
public
R
jcspList
(
@RequestBody
NewsParams
newsParams
)
{
Page
<
NewsMovieEntity
>
page
=
this
.
newsService
.
jcspList
(
newsParams
,
new
Page
(
newsParams
.
getPage
(),
newsParams
.
getLimit
()));
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
@Autowired
@Lazy
private
NewsMovieService
newsMovieService
;
/**
*精彩视频详情
*/
@Login
/**
* 信息
*/
@RequestMapping
(
"/api/jcspiInfo/{id}"
)
// @RequiresPermissions("manage:newsmovie:info")
public
R
jcspiInfo
(
@PathVariable
(
"id"
)
Integer
id
){
NewsMovieEntity
newsMovie
=
newsMovieService
.
getById
(
id
);
return
R
.
ok
().
put
(
"data"
,
newsMovie
);
}
}
}
src/main/java/io/office/modules/manage/dao/NewsDao.java
View file @
4dce1cee
...
@@ -95,4 +95,12 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
...
@@ -95,4 +95,12 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
List
<
NewsEntity
>
relatedLinks
(
Map
<
String
,
Object
>
params
);
List
<
NewsEntity
>
relatedLinks
(
Map
<
String
,
Object
>
params
);
List
<
SearchVo
>
getSearchInfo
(
@Param
(
"name"
)
String
name
,
@Param
(
"type"
)
String
type
,
Page
page
);
List
<
SearchVo
>
getSearchInfo
(
@Param
(
"name"
)
String
name
,
@Param
(
"type"
)
String
type
,
Page
page
);
List
<
NewsEntity
>
zhbdList
(
@Param
(
"newsParams"
)
NewsParams
newsParams
,
Page
page
);
List
<
NewsEntity
>
bzkydtList
(
NewsParams
newsParams
,
Page
page
);
List
<
NewtopicEntity
>
sdztList
(
NewsParams
newsParams
,
Page
page
);
List
<
NewsMovieEntity
>
jcspList
(
NewsParams
newsParams
,
Page
page
);
}
}
src/main/java/io/office/modules/manage/service/NewsService.java
View file @
4dce1cee
...
@@ -93,5 +93,13 @@ public interface NewsService extends IService<NewsEntity> {
...
@@ -93,5 +93,13 @@ public interface NewsService extends IService<NewsEntity> {
List
<
NewsEntity
>
relatedLinks
(
Map
<
String
,
Object
>
params
);
List
<
NewsEntity
>
relatedLinks
(
Map
<
String
,
Object
>
params
);
Page
<
SearchVo
>
getSearchInfo
(
String
name
,
String
type
,
Page
page
);
Page
<
SearchVo
>
getSearchInfo
(
String
name
,
String
type
,
Page
page
);
Page
<
NewsEntity
>
zhbdList
(
NewsParams
newsParams
,
Page
page
);
Page
<
NewsEntity
>
bzkydtList
(
NewsParams
newsParams
,
Page
page
);
Page
<
NewtopicEntity
>
sdztList
(
NewsParams
newsParams
,
Page
page
);
Page
<
NewsMovieEntity
>
jcspList
(
NewsParams
newsParams
,
Page
page
);
}
}
src/main/java/io/office/modules/manage/service/impl/NewsServiceImpl.java
View file @
4dce1cee
...
@@ -570,5 +570,33 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -570,5 +570,33 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
return
page
;
return
page
;
}
}
@Override
public
Page
<
NewsEntity
>
zhbdList
(
NewsParams
newsParams
,
Page
page
)
{
List
<
NewsEntity
>
list
=
this
.
newsDao
.
zhbdList
(
newsParams
,
page
);
page
.
setRecords
(
list
);
return
page
;
}
@Override
public
Page
<
NewsEntity
>
bzkydtList
(
NewsParams
newsParams
,
Page
page
)
{
List
<
NewsEntity
>
list
=
this
.
newsDao
.
bzkydtList
(
newsParams
,
page
);
page
.
setRecords
(
list
);
return
page
;
}
@Override
public
Page
<
NewtopicEntity
>
sdztList
(
NewsParams
newsParams
,
Page
page
)
{
List
<
NewtopicEntity
>
list
=
this
.
newsDao
.
sdztList
(
newsParams
,
page
);
page
.
setRecords
(
list
);
return
page
;
}
@Override
public
Page
<
NewsMovieEntity
>
jcspList
(
NewsParams
newsParams
,
Page
page
)
{
List
<
NewsMovieEntity
>
list
=
this
.
newsDao
.
jcspList
(
newsParams
,
page
);
page
.
setRecords
(
list
);
return
page
;
}
}
}
\ No newline at end of file
src/main/resources/mapper/manage/NewsDao.xml
View file @
4dce1cee
...
@@ -622,9 +622,63 @@ order by releasedate desc
...
@@ -622,9 +622,63 @@ order by releasedate desc
</select>
</select>
<select
id=
"zhbdList"
resultType=
"io.office.modules.manage.entity.NewsEntity"
>
SELECT
ltrim(b.name) classname ,a.*
FROM
news a
LEFT JOIN newsclass b ON a.classid = b.id
WHERE
status = 1
AND levels > 0
AND (
classid = 5
OR (
classid IN (
SELECT
id
FROM
newsClass
WHERE
p_id = 5
)
)
)
ORDER BY
levels DESC,
a.showtime DESC,
a.id DESC
</select>
<select
id=
"bzkydtList"
resultType=
"io.office.modules.manage.entity.NewsEntity"
>
SELECT
*
FROM
news
WHERE
status = 1
AND levels > 0
AND classid IN (32, 33)
ORDER BY
levels DESC,
showtime DESC,
id DESC
</select>
<select
id=
"sdztList"
resultType=
"io.office.modules.manage.entity.NewtopicEntity"
>
select * from newtopic where levels>0 and parentid=0 and checkflag=1 order by levels desc,showtime desc,classid desc
</select>
<select
id=
"jcspList"
resultType=
"io.office.modules.manage.entity.NewsMovieEntity"
>
SELECT
*
FROM
news_movie
WHERE
status = 1
AND levels > 0
ORDER BY
levels DESC,
showtime DESC,
id DESC
</select>
</mapper>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment