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
cd9e1cfb
Commit
cd9e1cfb
authored
Nov 30, 2021
by
吴迪
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
a8eb4c4b
afddff05
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
123 additions
and
1 deletions
+123
-1
NewsController.java
...a/io/office/modules/manage/controller/NewsController.java
+28
-0
PictureController.java
...o/office/modules/manage/controller/PictureController.java
+33
-0
PolicyController.java
...io/office/modules/manage/controller/PolicyController.java
+28
-0
NewsDao.java
src/main/java/io/office/modules/manage/dao/NewsDao.java
+1
-0
NewsService.java
...in/java/io/office/modules/manage/service/NewsService.java
+1
-0
NewsServiceImpl.java
...o/office/modules/manage/service/impl/NewsServiceImpl.java
+6
-0
NewsDao.xml
src/main/resources/mapper/manage/NewsDao.xml
+26
-1
No files found.
src/main/java/io/office/modules/manage/controller/NewsController.java
View file @
cd9e1cfb
...
...
@@ -2,6 +2,8 @@ package io.office.modules.manage.controller;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.dto.NewsParams
;
...
...
@@ -134,5 +136,31 @@ public class NewsController extends AbstractController {
}
}
/**
* 资讯中心
*/
@Login
@PostMapping
(
"/api/realTimeInfo"
)
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public
R
realTimeInfo
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
try
{
return
R
.
ok
().
put
(
"data"
,
newsService
.
selectRealTimeInfo
(
params
));
}
catch
(
Exception
e
)
{
log
.
error
(
"realTimeInfo error:"
,
e
);
return
R
.
error
(
e
.
getMessage
());
}
}
/**
* 资讯中心查看
*/
@Login
@GetMapping
(
"/api/info/{id}"
)
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public
R
getDetail
(
@PathVariable
(
"id"
)
Integer
id
)
{
NewsEntity
news
=
newsService
.
getById
(
id
);
return
R
.
ok
().
put
(
"data"
,
news
);
}
}
src/main/java/io/office/modules/manage/controller/PictureController.java
View file @
cd9e1cfb
...
...
@@ -141,4 +141,37 @@ public class PictureController extends AbstractController {
}
}
@Login
@PostMapping
(
"/api/pictureList"
)
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public
R
pictureList
()
{
try
{
QueryWrapper
<
PictureEntity
>
newsEntityQueryWrapper
=
new
QueryWrapper
<>();
newsEntityQueryWrapper
.
eq
(
"status"
,
"1"
);
newsEntityQueryWrapper
.
gt
(
"PicLevel"
,
"0"
);
newsEntityQueryWrapper
.
orderByDesc
(
"PicLevel"
);
newsEntityQueryWrapper
.
orderByDesc
(
"showtime"
);
newsEntityQueryWrapper
.
orderByDesc
(
"inputDate"
);
newsEntityQueryWrapper
.
orderByDesc
(
"pictureID"
);
List
<
PictureEntity
>
list
=
pictureService
.
list
(
newsEntityQueryWrapper
);
return
R
.
ok
().
put
(
"data"
,
list
);
}
catch
(
Exception
e
)
{
log
.
error
(
"pictureList error:"
,
e
);
return
R
.
error
(
e
.
getMessage
());
}
}
/**
* 信息
*/
@Login
@RequestMapping
(
"/api/info/{pictureid}"
)
// @RequiresPermissions("generator:picture:info")
public
R
getDetail
(
@PathVariable
(
"pictureid"
)
Integer
pictureid
){
PictureEntity
picture
=
pictureService
.
getById
(
pictureid
);
return
R
.
ok
().
put
(
"picture"
,
picture
);
}
}
src/main/java/io/office/modules/manage/controller/PolicyController.java
View file @
cd9e1cfb
...
...
@@ -136,5 +136,33 @@ public class PolicyController extends AbstractController {
return
R
.
error
(
e
.
getMessage
());
}
}
@Login
@PostMapping
(
"/api/policyList"
)
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public
R
policyList
()
{
try
{
QueryWrapper
<
PolicyEntity
>
policyEntityQueryWrapper
=
new
QueryWrapper
<>();
policyEntityQueryWrapper
.
eq
(
"class"
,
"法律法规"
);
policyEntityQueryWrapper
.
gt
(
"levels"
,
"0"
);
policyEntityQueryWrapper
.
eq
(
"status "
,
"1"
);
policyEntityQueryWrapper
.
orderByDesc
(
"levels"
);
policyEntityQueryWrapper
.
orderByDesc
(
"releasedate "
);
policyEntityQueryWrapper
.
orderByDesc
(
"id"
);
return
R
.
ok
().
put
(
"data"
,
policyService
.
list
(
policyEntityQueryWrapper
));
}
catch
(
Exception
e
)
{
log
.
error
(
"policyList error: {}"
,
e
);
return
R
.
error
(
e
.
getMessage
());
}
}
@Login
@GetMapping
(
"/api/info/{id}"
)
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public
R
getDetail
(
@PathVariable
(
"id"
)
Integer
id
){
PolicyEntity
policy
=
policyService
.
getById
(
id
);
return
R
.
ok
().
put
(
"policy"
,
policy
);
}
}
src/main/java/io/office/modules/manage/dao/NewsDao.java
View file @
cd9e1cfb
...
...
@@ -30,4 +30,5 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
*/
List
<
NewsEntity
>
selectNewsListCondition
(
@Param
(
"newsEntity"
)
NewsEntity
newsEntity
);
List
<
NewsEntity
>
selectRealTimeInfo
(
Map
<
String
,
Object
>
params
);
}
src/main/java/io/office/modules/manage/service/NewsService.java
View file @
cd9e1cfb
...
...
@@ -33,5 +33,6 @@ public interface NewsService extends IService<NewsEntity> {
List
<
NewsEntity
>
selectNewsListCondition
(
NewsEntity
newsEntity
);
List
<
NewsEntity
>
selectRealTimeInfo
(
Map
<
String
,
Object
>
params
);
}
src/main/java/io/office/modules/manage/service/impl/NewsServiceImpl.java
View file @
cd9e1cfb
...
...
@@ -113,4 +113,9 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
return
newsDao
.
selectNewsListCondition
(
newsEntity
);
}
@Override
public
List
<
NewsEntity
>
selectRealTimeInfo
(
Map
<
String
,
Object
>
params
)
{
return
newsDao
.
selectRealTimeInfo
(
params
);
}
}
\ No newline at end of file
src/main/resources/mapper/manage/NewsDao.xml
View file @
cd9e1cfb
...
...
@@ -181,5 +181,29 @@
id DESC
</select>
<select
id=
"selectRealTimeInfo"
resultMap=
"newsMap"
>
SELECT t.id,
t.title,
t.author,
t.showtime,
t.startdate,
t.keyword,
t.editor,
t.lasteditor,
t.auditor,
t.status,
t.classid,
t.levels,
t.releasedate,
t.updatedate,
t1.name
from news t
LEFT JOIN newsClass t1
on t.classid = t1.columnid
where t1.name is not null
and t.classid = #{classid}
and t.levels > 0
and t.status = '1'
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