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
59455424
Commit
59455424
authored
Dec 01, 2021
by
rongkailun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】党办文化新增
parent
1dbb9fe3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
0 deletions
+49
-0
TopicnewsController.java
...office/modules/manage/controller/TopicnewsController.java
+12
-0
NewsDao.java
src/main/java/io/office/modules/manage/dao/NewsDao.java
+2
-0
TopicnewsService.java
...va/io/office/modules/manage/service/TopicnewsService.java
+1
-0
TopicnewsServiceImpl.java
...ice/modules/manage/service/impl/TopicnewsServiceImpl.java
+8
-0
NewsDao.xml
src/main/resources/mapper/manage/NewsDao.xml
+26
-0
No files found.
src/main/java/io/office/modules/manage/controller/TopicnewsController.java
View file @
59455424
...
...
@@ -37,6 +37,7 @@ public class TopicnewsController extends AbstractController {
@RequestMapping
(
"/list"
)
// @RequiresPermissions("generator:topicnews:list")
public
R
list
(
@RequestBody
NewsParams
newsParams
){
newsParams
.
setClassId
(
428
);
Page
<
NewsEntity
>
page
=
this
.
topicnewsService
.
selectTopicList
(
newsParams
,
new
Page
(
newsParams
.
getPage
(),
newsParams
.
getLimit
()));
PageUtils
pageUtils
=
new
PageUtils
(
page
);
...
...
@@ -62,6 +63,7 @@ public class TopicnewsController extends AbstractController {
// @RequiresPermissions("generator:topicnews:save")
public
R
save
(
@RequestBody
NewsEntity
news
){
try
{
news
.
setClassid
(
428
);
R
r
=
this
.
topicnewsService
.
insertHdbd
(
news
,
getUser
());
return
r
;
}
catch
(
Exception
e
)
{
...
...
@@ -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
);
}
}
src/main/java/io/office/modules/manage/dao/NewsDao.java
View file @
59455424
...
...
@@ -31,4 +31,6 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
List
<
NewsEntity
>
selectNewsListCondition
(
@Param
(
"newsEntity"
)
NewsEntity
newsEntity
);
List
<
NewsEntity
>
selectRealTimeInfo
(
@Param
(
"newsParams"
)
NewsParams
newsParams
,
Page
page
);
List
<
NewsEntity
>
getHdbdList
(
@Param
(
"newsParams"
)
NewsParams
newsParams
,
Page
page
);
}
src/main/java/io/office/modules/manage/service/TopicnewsService.java
View file @
59455424
...
...
@@ -38,5 +38,6 @@ public interface TopicnewsService extends IService<TopicnewsEntity> {
List
<
TopicNewsPartyVo
>
getTopicNewsByCondition
(
TopicNewsPartyRequestVo
topicNewsPartyRequestVo
);
Page
<
NewsEntity
>
getHdbdList
(
NewsParams
newsParams
,
Page
page
);
}
src/main/java/io/office/modules/manage/service/impl/TopicnewsServiceImpl.java
View file @
59455424
...
...
@@ -111,4 +111,11 @@ public class TopicnewsServiceImpl extends ServiceImpl<TopicnewsDao, TopicnewsEnt
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
src/main/resources/mapper/manage/NewsDao.xml
View file @
59455424
...
...
@@ -206,4 +206,29 @@
and t.status = '1'
order by t.levels desc,t.showtime desc ,t.id desc
</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>
\ 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