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
1dbb9fe3
Commit
1dbb9fe3
authored
Dec 01, 2021
by
rongkailun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改】首页接口修改,列表支持分页查询,满足更多按钮
parent
70c41a39
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
127 additions
and
42 deletions
+127
-42
HotFollowController.java
...office/modules/manage/controller/HotFollowController.java
+19
-0
NewsController.java
...a/io/office/modules/manage/controller/NewsController.java
+6
-9
PictureController.java
...o/office/modules/manage/controller/PictureController.java
+9
-11
PolicyController.java
...io/office/modules/manage/controller/PolicyController.java
+24
-16
NewsDao.java
src/main/java/io/office/modules/manage/dao/NewsDao.java
+1
-1
PictureDao.java
src/main/java/io/office/modules/manage/dao/PictureDao.java
+3
-0
PolicyDao.java
src/main/java/io/office/modules/manage/dao/PolicyDao.java
+3
-0
NewsService.java
...in/java/io/office/modules/manage/service/NewsService.java
+1
-1
PictureService.java
...java/io/office/modules/manage/service/PictureService.java
+3
-0
PolicyService.java
.../java/io/office/modules/manage/service/PolicyService.java
+3
-0
NewsServiceImpl.java
...o/office/modules/manage/service/impl/NewsServiceImpl.java
+6
-2
PictureServiceImpl.java
...ffice/modules/manage/service/impl/PictureServiceImpl.java
+9
-0
PolicyServiceImpl.java
...office/modules/manage/service/impl/PolicyServiceImpl.java
+9
-0
NewsDao.xml
src/main/resources/mapper/manage/NewsDao.xml
+2
-2
PictureDao.xml
src/main/resources/mapper/manage/PictureDao.xml
+21
-0
PolicyDao.xml
src/main/resources/mapper/manage/PolicyDao.xml
+8
-0
No files found.
src/main/java/io/office/modules/manage/controller/HotFollowController.java
View file @
1dbb9fe3
...
...
@@ -3,6 +3,7 @@ package io.office.modules.manage.controller;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.NewsEntity
;
import
io.office.modules.manage.entity.TopicnewsEntity
;
import
io.office.modules.manage.entity.dto.NewsParams
;
...
...
@@ -13,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author rkl
...
...
@@ -111,4 +113,21 @@ public class HotFollowController extends AbstractController {
return
R
.
error
(
e
.
getMessage
());
}
}
/**
* 资讯中心查看
*/
@Login
@GetMapping
(
"/api/hotFollowList"
)
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public
R
getDetail
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
// newsParams.setClassId(435);
// Page<NewsEntity> page = this.topicnewsService.selectTopicList(newsParams,
// new Page(newsParams.getPage(),newsParams.getLimit()));
// PageUtils pageUtils = new PageUtils(page);
// return R.ok().put("page", pageUtils);
return
null
;
}
}
src/main/java/io/office/modules/manage/controller/NewsController.java
View file @
1dbb9fe3
...
...
@@ -139,17 +139,14 @@ 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
());
}
// @RequiresPermissions("manage:news:list")
public
R
realTimeInfo
(
@RequestBody
NewsParams
newsParams
)
{
Page
<
NewsEntity
>
page
=
this
.
newsService
.
selectRealTimeInfo
(
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/controller/PictureController.java
View file @
1dbb9fe3
...
...
@@ -5,13 +5,17 @@ import java.util.List;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.common.utils.R
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.IndexCarouselManageEntity
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.entity.NewsEntity
;
import
io.office.modules.manage.entity.PictureEntity
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.manage.entity.dto.PictureParams
;
import
io.office.modules.manage.service.PictureService
;
import
io.office.modules.sys.controller.AbstractController
;
...
...
@@ -145,18 +149,12 @@ public class PictureController extends AbstractController {
@Login
@PostMapping
(
"/api/pictureList"
)
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public
R
pictureList
()
{
public
R
pictureList
(
@RequestBody
NewsParams
params
)
{
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
);
Page
<
PictureEntity
>
page
=
this
.
pictureService
.
selectPictureNewList
(
params
,
new
Page
(
params
.
getPage
(),
params
.
getLimit
()));
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"page"
,
pageUtils
);
}
catch
(
Exception
e
)
{
log
.
error
(
"pictureList error:"
,
e
);
return
R
.
error
(
e
.
getMessage
());
...
...
src/main/java/io/office/modules/manage/controller/PolicyController.java
View file @
1dbb9fe3
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.Map
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -10,6 +9,7 @@ import io.office.common.utils.R;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.PictureEntity
;
import
io.office.modules.manage.entity.PolicyEntity
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.manage.entity.dto.PolicyParams
;
import
io.office.modules.manage.service.PolicyService
;
import
io.office.modules.sys.controller.AbstractController
;
...
...
@@ -139,20 +139,28 @@ public class PolicyController extends AbstractController {
@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
());
}
public
R
policyList
(
@RequestBody
NewsParams
params
)
{
// 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");
// List<PolicyEntity> list = policyService.policyListN(policyEntityQueryWrapper);
// Page<PolicyEntity> page = new Page(params.getPage(),params.getLimit());
// page.setRecords(list);
// PageUtils pageUtils = new PageUtils(page);
// return R.ok().put("data",pageUtils);
// } catch (Exception e) {
// log.error("policyList error: {}", e);
// return R.error(e.getMessage());
// }
Page
<
PolicyEntity
>
page
=
this
.
policyService
.
selectPolicyNewList
(
params
,
new
Page
(
params
.
getPage
(),
params
.
getLimit
()));
PageUtils
pageUtils
=
new
PageUtils
(
page
);
return
R
.
ok
().
put
(
"page"
,
pageUtils
);
}
@Login
...
...
src/main/java/io/office/modules/manage/dao/NewsDao.java
View file @
1dbb9fe3
...
...
@@ -30,5 +30,5 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
*/
List
<
NewsEntity
>
selectNewsListCondition
(
@Param
(
"newsEntity"
)
NewsEntity
newsEntity
);
List
<
NewsEntity
>
selectRealTimeInfo
(
Map
<
String
,
Object
>
params
);
List
<
NewsEntity
>
selectRealTimeInfo
(
@Param
(
"newsParams"
)
NewsParams
newsParams
,
Page
page
);
}
src/main/java/io/office/modules/manage/dao/PictureDao.java
View file @
1dbb9fe3
...
...
@@ -3,6 +3,7 @@ package io.office.modules.manage.dao;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.PictureEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.manage.entity.dto.PictureParams
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -20,4 +21,6 @@ import java.util.List;
public
interface
PictureDao
extends
BaseMapper
<
PictureEntity
>
{
List
<
PictureEntity
>
selectPictureList
(
@Param
(
"params"
)
PictureParams
params
,
Page
page
);
List
<
PictureEntity
>
selectPictureNewList
(
@Param
(
"params"
)
NewsParams
params
,
Page
page
);
}
src/main/java/io/office/modules/manage/dao/PolicyDao.java
View file @
1dbb9fe3
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
io.office.modules.manage.entity.NewsEntity
;
import
io.office.modules.manage.entity.PolicyEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.manage.entity.dto.PolicyParams
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -21,4 +22,6 @@ import java.util.List;
public
interface
PolicyDao
extends
BaseMapper
<
PolicyEntity
>
{
List
<
NewsEntity
>
selectPolicyList
(
@Param
(
"newsParams"
)
PolicyParams
params
,
Page
page
);
List
<
PolicyEntity
>
selectPolicyNewList
(
@Param
(
"newsParams"
)
NewsParams
params
,
Page
page
);
}
src/main/java/io/office/modules/manage/service/NewsService.java
View file @
1dbb9fe3
...
...
@@ -33,6 +33,6 @@ public interface NewsService extends IService<NewsEntity> {
List
<
NewsEntity
>
selectNewsListCondition
(
NewsEntity
newsEntity
);
List
<
NewsEntity
>
selectRealTimeInfo
(
Map
<
String
,
Object
>
params
);
Page
<
NewsEntity
>
selectRealTimeInfo
(
NewsParams
newsParams
,
Page
page
);
}
src/main/java/io/office/modules/manage/service/PictureService.java
View file @
1dbb9fe3
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
io.office.modules.manage.entity.PictureEntity
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.manage.entity.dto.PictureParams
;
import
io.office.modules.sys.entity.SysUserEntity
;
...
...
@@ -31,5 +32,7 @@ public interface PictureService extends IService<PictureEntity> {
R
verifyPicture
(
PictureEntity
picture
,
SysUserEntity
user
);
Page
<
PictureEntity
>
selectPictureList
(
PictureParams
params
,
Page
page
);
Page
<
PictureEntity
>
selectPictureNewList
(
NewsParams
params
,
Page
page
);
}
src/main/java/io/office/modules/manage/service/PolicyService.java
View file @
1dbb9fe3
...
...
@@ -6,6 +6,7 @@ import io.office.common.utils.PageUtils;
import
io.office.common.utils.R
;
import
io.office.modules.manage.entity.PictureEntity
;
import
io.office.modules.manage.entity.PolicyEntity
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.manage.entity.dto.PolicyParams
;
import
io.office.modules.sys.entity.SysUserEntity
;
...
...
@@ -31,5 +32,7 @@ public interface PolicyService extends IService<PolicyEntity> {
R
verifyTopic
(
PolicyEntity
policyEntity
,
SysUserEntity
user
);
Page
<
PictureEntity
>
selectPolicyList
(
PolicyParams
params
,
Page
page
);
Page
<
PolicyEntity
>
selectPolicyNewList
(
NewsParams
params
,
Page
page
);
}
src/main/java/io/office/modules/manage/service/impl/NewsServiceImpl.java
View file @
1dbb9fe3
...
...
@@ -114,8 +114,11 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
}
@Override
public
List
<
NewsEntity
>
selectRealTimeInfo
(
Map
<
String
,
Object
>
params
)
{
return
newsDao
.
selectRealTimeInfo
(
params
);
public
Page
<
NewsEntity
>
selectRealTimeInfo
(
NewsParams
newsParams
,
Page
page
)
{
List
<
NewsEntity
>
newsList
=
this
.
newsDao
.
selectRealTimeInfo
(
newsParams
,
page
);
page
.
setRecords
(
newsList
);
return
page
;
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/PictureServiceImpl.java
View file @
1dbb9fe3
...
...
@@ -7,6 +7,7 @@ import io.office.common.utils.R;
import
io.office.modules.manage.dao.PictureDao
;
import
io.office.modules.manage.entity.NewsEntity
;
import
io.office.modules.manage.entity.PictureEntity
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.manage.entity.dto.PictureParams
;
import
io.office.modules.manage.service.PictureService
;
import
io.office.modules.sys.entity.SysUserEntity
;
...
...
@@ -107,4 +108,11 @@ public class PictureServiceImpl extends ServiceImpl<PictureDao, PictureEntity> i
return
page
;
}
@Override
public
Page
<
PictureEntity
>
selectPictureNewList
(
NewsParams
params
,
Page
page
)
{
List
<
PictureEntity
>
newsList
=
this
.
pictureDao
.
selectPictureNewList
(
params
,
page
);
page
.
setRecords
(
newsList
);
return
page
;
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/PolicyServiceImpl.java
View file @
1dbb9fe3
...
...
@@ -9,6 +9,7 @@ import io.office.modules.manage.dao.PolicyDao;
import
io.office.modules.manage.entity.NewsEntity
;
import
io.office.modules.manage.entity.PictureEntity
;
import
io.office.modules.manage.entity.PolicyEntity
;
import
io.office.modules.manage.entity.dto.NewsParams
;
import
io.office.modules.manage.entity.dto.PolicyParams
;
import
io.office.modules.manage.service.PolicyService
;
import
io.office.modules.sys.entity.SysUserEntity
;
...
...
@@ -104,4 +105,11 @@ public class PolicyServiceImpl extends ServiceImpl<PolicyDao, PolicyEntity> impl
return
page
;
}
@Override
public
Page
<
PolicyEntity
>
selectPolicyNewList
(
NewsParams
params
,
Page
page
)
{
List
<
PolicyEntity
>
newsList
=
this
.
policyDao
.
selectPolicyNewList
(
params
,
page
);
page
.
setRecords
(
newsList
);
return
page
;
}
}
\ No newline at end of file
src/main/resources/mapper/manage/NewsDao.xml
View file @
1dbb9fe3
...
...
@@ -199,9 +199,9 @@
t1.name
from news t
LEFT JOIN newsClass t1
on t.classid = t1.
column
id
on t.classid = t1.id
where t1.name is not null
and t.classid = #{
classi
d}
and t.classid = #{
newsParams.classI
d}
and t.levels > 0
and t.status = '1'
order by t.levels desc,t.showtime desc ,t.id desc
...
...
src/main/resources/mapper/manage/PictureDao.xml
View file @
1dbb9fe3
...
...
@@ -65,4 +65,24 @@
ORDER BY
pictureID DESC
</select>
<select
id=
"selectPictureNewList"
resultMap=
"pictureMap"
parameterType=
"io.office.modules.manage.entity.dto.PictureParams"
>
SELECT
t.pictureID,
t.title,
t.Picture_type,
t.showtime,
t.inputDate,
t.keyword,
t.Editor,
t.lasteditor,
t.auditor,
t.Status,
t.PicLevel
FROM
picture t
where 1=1
and t.PicLevel > 0
and t.status = '1'
order by t.PicLevel desc,t.showtime desc ,t.inputDate desc,t.pictureID desc
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/manage/PolicyDao.xml
View file @
1dbb9fe3
...
...
@@ -49,5 +49,12 @@
id DESC
</select>
<select
id=
"selectPolicyNewList"
resultMap=
"policyMap"
parameterType=
"io.office.modules.manage.entity.dto.PolicyParams"
>
select id,class,title,editor,lasteditor,releasedate,updatedate,auditor,status,levels from Policy
where 1=1
and levels > 0
and status = '1'
order by levels desc,releasedate desc ,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