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
beeb48fa
Commit
beeb48fa
authored
Dec 13, 2021
by
rongkailun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】图片资讯、中心活动、党办文化 四个图片接口;
专题推荐、专题推荐详情、上月资讯排行
parent
d38793c1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
127 additions
and
19 deletions
+127
-19
NewsController.java
...a/io/office/modules/manage/controller/NewsController.java
+35
-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
+24
-0
NewsDao.xml
src/main/resources/mapper/manage/NewsDao.xml
+32
-1
PictureDao.xml
src/main/resources/mapper/manage/PictureDao.xml
+20
-18
No files found.
src/main/java/io/office/modules/manage/controller/NewsController.java
View file @
beeb48fa
...
@@ -428,4 +428,39 @@ public class NewsController extends AbstractController {
...
@@ -428,4 +428,39 @@ public class NewsController extends AbstractController {
return
R
.
ok
().
put
(
"data"
,
list
);
return
R
.
ok
().
put
(
"data"
,
list
);
}
}
/**图片资讯上方*/
@Login
@GetMapping
(
"/api/pictureTop4"
)
public
R
pictureTop4
()
{
List
<
PictureEntity
>
list
=
this
.
newsService
.
pictureTop4
();
return
R
.
ok
().
put
(
"data"
,
list
);
}
/**上月资讯排行*/
@Login
@GetMapping
(
"/api/syzxphList"
)
public
R
syzxphList
()
{
List
<
NewsEntity
>
list
=
this
.
newsService
.
syzxphList
();
return
R
.
ok
().
put
(
"data"
,
list
);
}
/**专题推荐*/
@Login
@GetMapping
(
"/api/zttjList"
)
public
R
zttjList
()
{
List
<
NewtopicEntity
>
list
=
this
.
newsService
.
zttjList
();
return
R
.
ok
().
put
(
"data"
,
list
);
}
@Autowired
@Lazy
NewtopicService
newtopicService
;
/**专题推荐*/
@Login
@GetMapping
(
"/api/newsTopicInfo/{id}"
)
public
R
newsTopicInfo
(
@PathVariable
(
"id"
)
String
id
)
{
NewtopicEntity
newtopic
=
newtopicService
.
getById
(
id
);
return
R
.
ok
().
put
(
"data"
,
newtopic
);
}
}
}
src/main/java/io/office/modules/manage/dao/NewsDao.java
View file @
beeb48fa
...
@@ -82,4 +82,12 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
...
@@ -82,4 +82,12 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
List
<
NewsEntity
>
centerTop6
();
List
<
NewsEntity
>
centerTop6
();
List
<
NewsEntity
>
gzzdTop7
();
List
<
NewsEntity
>
gzzdTop7
();
List
<
PictureEntity
>
pictureTop4
();
List
<
NewsEntity
>
pictureBelow
();
List
<
NewsEntity
>
syzxphList
();
List
<
NewtopicEntity
>
zttjList
();
}
}
src/main/java/io/office/modules/manage/service/NewsService.java
View file @
beeb48fa
...
@@ -80,5 +80,13 @@ public interface NewsService extends IService<NewsEntity> {
...
@@ -80,5 +80,13 @@ public interface NewsService extends IService<NewsEntity> {
List
<
NewsEntity
>
centerTop6
();
List
<
NewsEntity
>
centerTop6
();
List
<
NewsEntity
>
gzzdTop7
();
List
<
NewsEntity
>
gzzdTop7
();
List
<
PictureEntity
>
pictureTop4
();
List
<
NewsEntity
>
pictureBelow
();
List
<
NewsEntity
>
syzxphList
();
List
<
NewtopicEntity
>
zttjList
();
}
}
src/main/java/io/office/modules/manage/service/impl/NewsServiceImpl.java
View file @
beeb48fa
...
@@ -477,6 +477,30 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -477,6 +477,30 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
return
list
;
return
list
;
}
}
@Override
public
List
<
PictureEntity
>
pictureTop4
()
{
List
<
PictureEntity
>
list
=
this
.
newsDao
.
pictureTop4
();
return
list
;
}
@Override
public
List
<
NewsEntity
>
pictureBelow
()
{
List
<
NewsEntity
>
list
=
this
.
newsDao
.
pictureBelow
();
return
list
;
}
@Override
public
List
<
NewsEntity
>
syzxphList
()
{
List
<
NewsEntity
>
list
=
this
.
newsDao
.
syzxphList
();
return
list
;
}
@Override
public
List
<
NewtopicEntity
>
zttjList
()
{
List
<
NewtopicEntity
>
list
=
this
.
newsDao
.
zttjList
();
return
list
;
}
private
List
<
Map
<
String
,
Object
>>
getDataListNew
(
Map
<
String
,
Object
>
map
,
Page
page
)
{
private
List
<
Map
<
String
,
Object
>>
getDataListNew
(
Map
<
String
,
Object
>
map
,
Page
page
)
{
List
<
Map
<
String
,
Object
>>
list
=
this
.
newsDao
.
searchKnowledgeInfoNewList
(
map
,
page
);
List
<
Map
<
String
,
Object
>>
list
=
this
.
newsDao
.
searchKnowledgeInfoNewList
(
map
,
page
);
return
list
;
return
list
;
...
...
src/main/resources/mapper/manage/NewsDao.xml
View file @
beeb48fa
...
@@ -210,7 +210,7 @@
...
@@ -210,7 +210,7 @@
and t.classid = #{newsParams.classId}
and t.classid = #{newsParams.classId}
and t.levels > 0
and t.levels > 0
and t.status = '1'
and t.status = '1'
order by t.levels desc,t.id desc
order by t.levels desc,t.
showtime DESC,t.
id desc
</select>
</select>
<select
id=
"getHdbdList"
resultMap=
"newsMap"
>
<select
id=
"getHdbdList"
resultMap=
"newsMap"
>
...
@@ -563,4 +563,34 @@ ORDER BY
...
@@ -563,4 +563,34 @@ ORDER BY
levels DESC,
levels DESC,
releasedate DESC
releasedate DESC
</select>
</select>
<select
id=
"pictureTop4"
resultType=
"io.office.modules.manage.entity.PictureEntity"
>
select top 4 * from picture where status=1 and PicLevel>0 order by PicLevel desc, pictureid desc
</select>
<select
id=
"pictureBelow"
resultType=
"io.office.modules.manage.entity.NewsEntity"
>
select top 4 * from picture where status=1 and PicLevel>0 order by PicLevel desc, pictureid desc
</select>
<select
id=
"syzxphList"
resultType=
"io.office.modules.manage.entity.NewsEntity"
>
SELECT
TOP 10 *
FROM
news
WHERE
status = 1
AND levels > 0
AND (
classid IN (5, 6, 7, 8)
OR classid IN (
SELECT
id
FROM
newsClass
WHERE
p_id = 5
)
)
and DATEDIFF(mm,releasedate,getdate())=1 and classid !=29 and levels != 9 order by hits desc
</select>
<select
id=
"zttjList"
resultType=
"io.office.modules.manage.entity.NewtopicEntity"
>
select top 10 * from NewTopic where levels>0 and parentid=0 and checkflag=1 order by levels desc,classid desc
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/mapper/manage/PictureDao.xml
View file @
beeb48fa
...
@@ -69,23 +69,24 @@
...
@@ -69,23 +69,24 @@
pictureID DESC
pictureID DESC
</select>
</select>
<select
id=
"selectPictureNewList"
resultMap=
"pictureMap"
parameterType=
"io.office.modules.manage.entity.dto.PictureParams"
>
<select
id=
"selectPictureNewList"
resultMap=
"pictureMap"
parameterType=
"io.office.modules.manage.entity.dto.PictureParams"
>
SELECT
SELECT
t.pictureID,
*
t.title,
FROM
t.Picture_type,
picture
t.showtime,
WHERE
t.inputDate,
status = 1
t.keyword,
AND PicLevel > 0
t.Editor,
AND pictureid NOT IN (
t.lasteditor,
SELECT
t.auditor,
TOP 4 pictureid
t.Status,
FROM
t.PicLevel
picture
FROM
ORDER BY
picture t
PicLevel DESC,
where 1=1
pictureid DESC
and t.PicLevel > 0
)
and t.status = '1'
ORDER BY
order by t.PicLevel desc,t.showtime desc ,t.inputDate desc,t.pictureID desc
PicLevel DESC,
pictureid DESC
</select>
</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