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
96593e85
Commit
96593e85
authored
Aug 06, 2022
by
陶湘宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文件传阅每个人可以添加附件
parent
a4349879
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
src/main/java/cn/timer/api/controller/qyxx/CmsController.java
+24
-2
No files found.
src/main/java/cn/timer/api/controller/qyxx/CmsController.java
View file @
96593e85
...
...
@@ -11,6 +11,8 @@ import cn.timer.api.dto.qyxx.CmsContentReadDto;
import
cn.timer.api.utils.redis.RedisUtil
;
import
com.github.yulichang.query.MPJQueryWrapper
;
import
lombok.extern.slf4j.Slf4j
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -415,7 +417,8 @@ public class CmsController {
.
between
(!
StrUtil
.
hasBlank
(
s
)
&&
!
StrUtil
.
hasBlank
(
e
),
"releasetime"
,
!
StrUtil
.
hasBlank
(
s
)
?
s
:
"1000-01-01 00:00:00"
,
!
StrUtil
.
hasBlank
(
e
)
?
e
:
"9999-01-01 00:00:00"
)
.
and
(
wq
->
wq
.
like
(
"publisher"
,
userBean
.
getEmpNum
()).
or
().
like
(
"author"
,
userBean
.
getUserInfo
().
getName
()).
or
().
like
(
"title"
,
userBean
.
getUserInfo
().
getName
()))
.
and
(
wq
->
wq
.
eq
(
"publisher"
,
userBean
.
getEmpNum
()).
or
().
eq
(
"author"
,
userBean
.
getUserInfo
().
getName
()).
or
().
inSql
(
"id"
,
"select cms_content_id from cms_content_read where user_id ="
+
userBean
.
getEmpNum
()))
.
orderByDesc
(
"addeddate"
);
IPage
<
CmsContent
>
cmsContentPage
=
CmsContent
.
builder
().
build
().
selectPage
(
page
,
queryWrapper
);
List
<
CmsContent
>
cmsContents
=
cmsContentPage
.
getRecords
();
...
...
@@ -524,7 +527,6 @@ public class CmsController {
* 添加已读
*
* @param userBean
* @param id
* @return
*/
@GetMapping
(
value
=
"/isread"
)
...
...
@@ -720,7 +722,27 @@ public class CmsController {
}
return
ResultUtil
.
success
();
}
/**
* 根据讯息id查传阅增加文件
* @return
*/
@PostMapping
(
value
=
"/cmsAddFile"
)
@ApiOperation
(
value
=
"文件传阅增加文件"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
cmsAddFile
(
@CurrentUser
UserBean
userBean
,
@RequestBody
JSONObject
request
)
{
String
cmsContentId
=
request
.
getString
(
"cmsContentId"
);
//用户id查询传阅消息
QueryWrapper
<
CmsContent
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"id"
,
cmsContentId
);
CmsContent
cmsContent
=
CmsContent
.
builder
().
build
().
selectOne
(
queryWrapper
);
JSONArray
addjsonArray
=
JSONArray
.
fromObject
(
request
.
getString
(
"filepathcms"
));
JSONArray
resjsonArray
=
JSONArray
.
fromObject
(
cmsContent
.
getFilepath
());
resjsonArray
.
addAll
(
addjsonArray
);
cmsContent
.
setFilepath
(
resjsonArray
.
toString
());
cmsContentMapper
.
updateById
(
cmsContent
);
return
ResultUtil
.
data
(
resjsonArray
.
toString
());
}
/**
* 添加传阅人员
* @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