Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
dd948a60
Commit
dd948a60
authored
Jun 11, 2022
by
翁国栋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8小时后台--
应需求一定要展示前四张图片
parent
ef0568de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
16 deletions
+22
-16
src/main/java/cn/timer/api/controller/qyxx/CmsController.java
+22
-16
No files found.
src/main/java/cn/timer/api/controller/qyxx/CmsController.java
View file @
dd948a60
package
cn
.
timer
.
api
.
controller
.
qyxx
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Timer
;
import
java.util.TimerTask
;
import
java.util.*
;
import
cn.timer.api.utils.redis.RedisUtil
;
import
com.google.common.collect.Maps
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
...
...
@@ -88,18 +85,27 @@ public class CmsController {
*/
@GetMapping
(
value
=
"/zxqyxx"
)
@ApiOperation
(
value
=
"获取最新讯息的标题、发布时间"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
CmsContent
>>
groupbyTime
(
@CurrentUser
UserBean
userBean
)
{
public
Result
<
Object
>
groupbyTime
(
@CurrentUser
UserBean
userBean
)
{
Map
map
=
Maps
.
newHashMap
();
Integer
orgCode
=
userBean
.
getOrgCode
();
QueryWrapper
<
CmsContent
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
select
(
"id"
,
"title"
,
"author"
,
"releasetime"
,
"fmtpath"
).
eq
(
"releasestate"
,
0
)
.
eq
(
"organization_id"
,
orgCode
).
orderByDesc
(
"releasetime"
).
last
(
"limit 6"
);
List
<
CmsContent
>
qynr
=
CmsContent
.
builder
().
build
().
selectList
(
queryWrapper
);
return
ResultUtil
.
data
(
qynr
,
"查询分类成功!"
);
/*应需求一定要展示前四张图片*/
QueryWrapper
<
CmsContent
>
qw
=
new
QueryWrapper
<>();
qw
.
select
(
"fmtpath"
).
eq
(
"releasestate"
,
0
).
isNotNull
(
"fmtpath"
).
ne
(
"fmtpath"
,
""
)
.
eq
(
"organization_id"
,
orgCode
).
orderByDesc
(
"releasetime"
).
last
(
"limit 4"
);
List
<
CmsContent
>
picList
=
CmsContent
.
builder
().
build
().
selectList
(
qw
);
map
.
put
(
"list"
,
qynr
);
map
.
put
(
"picList"
,
picList
);
return
ResultUtil
.
data
(
map
,
"查询分类成功!"
);
}
/**
* 分类,获取标题和发布时间
*
*
*/
// @GetMapping(value = "/flhqqyxx")
// @ApiOperation(value = "获取首页分类讯息标题、发布时间", httpMethod = "GET", notes = "接口发布说明")
...
...
@@ -132,7 +138,7 @@ public class CmsController {
/**
* 分类内容获取
*
*
*/
@GetMapping
(
value
=
"/getType"
)
@ApiOperation
(
value
=
"分类内容获取"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
...
...
@@ -158,7 +164,7 @@ public class CmsController {
/**
* 获取分类
*
*
*/
@GetMapping
(
value
=
"/xxfl"
)
@ApiOperation
(
value
=
"获取分类"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
...
...
@@ -321,7 +327,7 @@ public class CmsController {
cmsContentPage
.
getSize
();
return
ResultUtil
.
data
(
cmsContentPage
,
cmsContents
,
"企业OA讯息搜索成功"
);
}
/**
* 企业OA讯息查询
*/
...
...
@@ -357,7 +363,7 @@ public class CmsController {
/**
* 根据id查讯息
*
*
* @param id
* @return
*/
...
...
@@ -413,7 +419,7 @@ public class CmsController {
/**
* 讯息发布
*
*
* @param id
*/
@GetMapping
(
value
=
"/qyxxsdfb/{id}"
)
...
...
@@ -432,7 +438,7 @@ public class CmsController {
/**
* 讯息收回
*
*
* @param id
*/
@GetMapping
(
value
=
"/qyxxtb/{id}"
)
...
...
@@ -451,7 +457,7 @@ public class CmsController {
/**
* 添加已读
*
*
* @param userBean
* @param id
* @return
...
...
@@ -477,7 +483,7 @@ public class CmsController {
/**
* 查询已读人
*
*
* @param userBean
* @param mid
* @return
...
...
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