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
055fc758
Commit
055fc758
authored
Jun 23, 2022
by
284718418@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OA 讯息添加文件传阅
parent
65dcbec8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
126 additions
and
9 deletions
+126
-9
src/main/java/cn/timer/api/bean/qyxx/CmsContentRead.java
+74
-0
src/main/java/cn/timer/api/controller/qyxx/CmsController.java
+25
-9
src/main/java/cn/timer/api/dao/qyxx/CmsContentReadMapper.java
+17
-0
src/main/java/cn/timer/api/dto/qyxx/CmsContentDto.java
+10
-0
No files found.
src/main/java/cn/timer/api/bean/qyxx/CmsContentRead.java
0 → 100644
View file @
055fc758
package
cn
.
timer
.
api
.
bean
.
qyxx
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.util.Date
;
/**
* 文件传阅表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2022-06-23
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"cms_content_read"
)
@ApiModel
(
"文件传阅表"
)
public
class
CmsContentRead
extends
Model
<
CmsContentRead
>{
private
static
final
long
serialVersionUID
=
-
5904257321968702198L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"编号"
,
example
=
"1"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"企业讯息主表ID"
,
example
=
"101"
)
private
Integer
cmsContentId
;
@ApiModelProperty
(
value
=
"留言/意见反馈"
,
example
=
""
)
private
String
reviewContent
;
@ApiModelProperty
(
value
=
"留言/意见反馈时间"
,
example
=
""
)
private
Date
reviewTime
;
@ApiModelProperty
(
value
=
"组织机构代码"
,
example
=
"1"
)
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"用户ID"
,
example
=
"1"
)
private
Integer
userId
;
@ApiModelProperty
(
value
=
"用户姓名"
,
example
=
"张三"
)
private
String
userName
;
@ApiModelProperty
(
value
=
"阅读标记0.未读 1.已读"
,
example
=
"0"
)
private
Integer
readStatus
;
@ApiModelProperty
(
value
=
"逻辑删除标记0.未删除 1.删除"
,
example
=
"0"
)
private
Integer
deleteFlag
;
@ApiModelProperty
(
value
=
"创建时间"
,
example
=
""
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"更新时间"
,
example
=
""
)
private
Date
updateTime
;
}
src/main/java/cn/timer/api/controller/qyxx/CmsController.java
View file @
055fc758
...
@@ -6,11 +6,13 @@ import java.util.List;
...
@@ -6,11 +6,13 @@ import java.util.List;
import
java.util.Timer
;
import
java.util.Timer
;
import
java.util.TimerTask
;
import
java.util.TimerTask
;
import
cn.timer.api.bean.qyxx.*
;
import
cn.timer.api.utils.redis.RedisUtil
;
import
cn.timer.api.utils.redis.RedisUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
@@ -29,10 +31,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -29,10 +31,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.timer.api.bean.qyxx.CmsAnnouncement
;
import
cn.timer.api.bean.qyxx.CmsContent
;
import
cn.timer.api.bean.qyxx.CmsContentModular
;
import
cn.timer.api.bean.qyxx.CmsIsRead
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.annotation.UserBean
;
...
@@ -194,7 +192,7 @@ public class CmsController {
...
@@ -194,7 +192,7 @@ public class CmsController {
// 录入时间
// 录入时间
qynr
.
setAddeddate
(
now
);
qynr
.
setAddeddate
(
now
);
// 发布方式:1,审核通过后立即发布,2定时发布,3手动发布
// 发布方式:1,审核通过后立即发布,2定时发布,3手动发布
,4立即发布
Integer
fbfs
=
qynr
.
getReleasetype
();
Integer
fbfs
=
qynr
.
getReleasetype
();
// 定时
// 定时
if
(
fbfs
!=
null
&&
fbfs
==
2
)
{
if
(
fbfs
!=
null
&&
fbfs
==
2
)
{
...
@@ -205,12 +203,30 @@ public class CmsController {
...
@@ -205,12 +203,30 @@ public class CmsController {
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
)).
getName
());
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
)).
getName
());
qynr
.
setReleasetype
(
fbfs
);
qynr
.
setReleasetype
(
fbfs
);
qynr
.
setStatus
(
0
);
qynr
.
setStatus
(
0
);
if
(
fbfs
!=
null
&&
fbfs
==
4
){
qynr
.
setReleasestate
(
0
);
qynr
.
setStatus
(
1
);
}
qynr
.
insertOrUpdate
();
qynr
.
insertOrUpdate
();
// 新增 文件传阅 人员数据
if
(
a
){
if
(!
CollectionUtils
.
isEmpty
(
cmsContentDto
.
getCmsContentReads
())){
for
(
CmsContentRead
entity
:
cmsContentDto
.
getCmsContentReads
()
)
{
entity
.
setCmsContentId
(
qynr
.
getId
());
entity
.
setOrgCode
(
orgCode
);
entity
.
setReadStatus
(
0
);
entity
.
setDeleteFlag
(
0
);
entity
.
insert
();
}
}
}
if
(
a
)
if
(
a
){
return
ResultUtil
.
data
(
qynr
,
"提交成功、等待管理员审核"
);
String
msg
=
fbfs
==
4
?
"提交成功"
:
"提交成功、等待管理员审核"
;
else
return
ResultUtil
.
data
(
qynr
,
msg
);
}
else
{
return
ResultUtil
.
data
(
qynr
,
"修改成功"
);
return
ResultUtil
.
data
(
qynr
,
"修改成功"
);
}
}
}
/**
/**
...
...
src/main/java/cn/timer/api/dao/qyxx/CmsContentReadMapper.java
0 → 100644
View file @
055fc758
package
cn
.
timer
.
api
.
dao
.
qyxx
;
import
cn.timer.api.bean.qyxx.CmsContentRead
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
/**
* 文件传阅表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2022-06-23
*/
@Repository
public
interface
CmsContentReadMapper
extends
BaseMapper
<
CmsContentRead
>
{
}
src/main/java/cn/timer/api/dto/qyxx/CmsContentDto.java
View file @
055fc758
package
cn
.
timer
.
api
.
dto
.
qyxx
;
package
cn
.
timer
.
api
.
dto
.
qyxx
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.List
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Id
;
import
javax.persistence.Transient
;
import
cn.timer.api.bean.qyxx.CmsContentRead
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
cn.timer.api.utils.Page
;
import
cn.timer.api.utils.Page
;
...
@@ -137,4 +141,9 @@ public class CmsContentDto extends Page implements Serializable{
...
@@ -137,4 +141,9 @@ public class CmsContentDto extends Page implements Serializable{
@ApiModelProperty
(
value
=
"定时发布时间"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"定时发布时间"
,
example
=
"101"
)
private
Long
fixedTime
;
// 定时发布时间
private
Long
fixedTime
;
// 定时发布时间
/**
* 文件传阅人员
*/
@ApiModelProperty
(
value
=
"文件传阅人员"
)
private
List
<
CmsContentRead
>
cmsContentReads
;
}
}
\ 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