Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
EncryptedFileSystem
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhangshuang
EncryptedFileSystem
Commits
2224160d
提交
2224160d
authored
3月 25, 2020
作者:
xc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xc
上级
991db5a5
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
370 行增加
和
0 行删除
+370
-0
pom.xml
efs-bus/pom.xml
+33
-0
BusApplication.java
efs-bus/src/main/java/com/zjty/efs/bus/BusApplication.java
+19
-0
NoticeDao.java
efs-bus/src/main/java/com/zjty/efs/bus/Dao/NoticeDao.java
+9
-0
NoticeController.java
...in/java/com/zjty/efs/bus/controller/NoticeController.java
+79
-0
FileList.java
efs-bus/src/main/java/com/zjty/efs/bus/entity/FileList.java
+14
-0
Notice.java
efs-bus/src/main/java/com/zjty/efs/bus/entity/Notice.java
+108
-0
NoticeService.java
...src/main/java/com/zjty/efs/bus/service/NoticeService.java
+40
-0
NoticeServiceImpl.java
...java/com/zjty/efs/bus/service/impl/NoticeServiceImpl.java
+35
-0
application.properties
efs-bus/src/main/resources/application.properties
+18
-0
pom.xml
efs-misc/pom.xml
+15
-0
没有找到文件。
efs-bus/pom.xml
浏览文件 @
2224160d
...
@@ -10,6 +10,38 @@
...
@@ -10,6 +10,38 @@
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
efs-bus
</artifactId>
<artifactId>
efs-bus
</artifactId>
<dependencies>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
8.0.19
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-jpa
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
<version>
1.2.51
</version>
</dependency>
<dependency>
<groupId>
com.zjty
</groupId>
<artifactId>
efs-misc
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-annotations
</artifactId>
<version>
1.5.18
</version>
</dependency>
</dependencies>
</project>
</project>
\ No newline at end of file
efs-bus/src/main/java/com/zjty/efs/bus/BusApplication.java
0 → 100644
浏览文件 @
2224160d
package
com
.
zjty
.
efs
.
bus
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.context.annotation.ComponentScan
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
@SpringBootApplication
@ComponentScan
(
basePackages
=
{
"com.zjty.efs.misc"
,
"com.zjty.efs.bus"
})
@EnableSwagger2
public
class
BusApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
BusApplication
.
class
,
args
);
}
}
efs-bus/src/main/java/com/zjty/efs/bus/Dao/NoticeDao.java
0 → 100644
浏览文件 @
2224160d
package
com
.
zjty
.
efs
.
bus
.
Dao
;
import
com.zjty.efs.bus.entity.Notice
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.stereotype.Repository
;
@Repository
public
interface
NoticeDao
extends
JpaRepository
<
Notice
,
Integer
>
{
}
efs-bus/src/main/java/com/zjty/efs/bus/controller/NoticeController.java
0 → 100644
浏览文件 @
2224160d
package
com
.
zjty
.
efs
.
bus
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.zjty.efs.bus.entity.Notice
;
import
com.zjty.efs.bus.service.NoticeService
;
import
com.zjty.efs.misc.config.AutoDocument
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
@AutoDocument
@Api
(
tags
=
"通知接口"
)
@RestController
@RequestMapping
(
"/notice"
)
public
class
NoticeController
{
@Autowired
private
NoticeService
noticeService
;
@ApiOperation
(
value
=
"测试接口"
)
@ApiImplicitParam
(
name
=
"notice"
,
value
=
""
,
dataType
=
"String"
,
paramType
=
"query"
,
required
=
true
)
@PostMapping
(
"/testNotice"
)
public
String
test
(
@RequestParam
String
notice
){
System
.
out
.
println
(
notice
);
return
"test"
;
}
/**
* 新增通知
* @param notice
* @return
*/
@ApiOperation
(
value
=
"新增通知接口"
)
@ApiImplicitParam
(
name
=
"notice"
,
value
=
"通知实体"
,
dataType
=
"Notice"
,
paramType
=
"body"
,
required
=
true
)
@PostMapping
(
"/addNotice"
)
public
String
addNotice
(
@RequestBody
@Valid
Notice
notice
){
System
.
out
.
println
(
notice
);
return
noticeService
.
addNotice
(
notice
);
}
/**
* 修改通知
* @param notice
* @return
*/
@ApiOperation
(
value
=
"修改通知接口"
)
@ApiImplicitParam
(
name
=
"notice"
,
value
=
"通知实体"
,
dataType
=
"Notice"
,
paramType
=
"body"
,
required
=
true
)
@PostMapping
(
"/updateNotice"
)
public
String
updateNotice
(
@RequestBody
@Valid
Notice
notice
){
System
.
out
.
println
(
notice
);
return
noticeService
.
updateNotice
(
notice
);
}
@ApiOperation
(
value
=
"查看通知接口"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"通知id"
,
paramType
=
"query"
,
required
=
true
,
example
=
"1"
)
@PostMapping
(
"/getNotice"
)
public
String
getNotice
(
@RequestParam
int
id
){
System
.
out
.
println
(
id
);
return
noticeService
.
getNotice
(
id
);
}
@PostMapping
(
"/getNoticeList"
)
@ApiOperation
(
value
=
"获取通知列表接口"
,
notes
=
"获取列表,type为通知类型,接收 0,发送 1,草稿 2,消息提醒 0"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"user"
,
value
=
"当前用户名称"
,
paramType
=
"query"
,
required
=
true
,
example
=
"username"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"通知类型"
,
paramType
=
"query"
,
required
=
true
,
example
=
"0"
,
dataType
=
"int"
)})
public
String
getNoticeList
(
@RequestParam
String
user
,
int
type
){
return
noticeService
.
getReceiveList
(
user
,
type
);
}
}
efs-bus/src/main/java/com/zjty/efs/bus/entity/FileList.java
0 → 100644
浏览文件 @
2224160d
package
com
.
zjty
.
efs
.
bus
.
entity
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@AllArgsConstructor
@NoArgsConstructor
@Data
public
class
FileList
{
private
String
id
;
private
String
address
;
}
efs-bus/src/main/java/com/zjty/efs/bus/entity/Notice.java
0 → 100644
浏览文件 @
2224160d
package
com
.
zjty
.
efs
.
bus
.
entity
;
import
com.zjty.efs.misc.config.AutoDocument
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Generated
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.*
;
import
java.util.Date
;
/**
* 通知表
*/
@AutoDocument
//@ApiModel(value = "通知", description = "通知实体类")
@AllArgsConstructor
@NoArgsConstructor
@Data
@Entity
@Table
(
name
=
"notice"
)
public
class
Notice
{
/**
* id
*/
@ApiModelProperty
(
value
=
"id"
,
example
=
"1"
)
@Id
@GeneratedValue
@Column
(
name
=
"id"
)
private
int
id
;
/**
* 标题
*/
@ApiModelProperty
(
value
=
"title"
,
example
=
"验收通知"
,
dataType
=
"String"
,
name
=
"标题"
)
@Column
(
name
=
"title"
)
private
String
title
;
/**
* 收件人
*/
@ApiModelProperty
(
value
=
"addressee"
,
example
=
"谢潮"
,
dataType
=
"String"
,
name
=
"收件人"
)
@Column
(
name
=
"addressee"
)
private
String
addressee
;
/**
* 发件人
*/
@ApiModelProperty
(
value
=
"sender"
,
example
=
"谢借口"
,
dataType
=
"String"
,
name
=
"发件人"
)
@Column
(
name
=
"sender"
)
private
String
sender
;
/**
* 留言
*/
@ApiModelProperty
(
value
=
"message"
,
example
=
"尽快完成"
,
dataType
=
"String"
,
name
=
"留言"
)
@Column
(
name
=
"message"
)
private
String
message
;
/**
* 通知状态 已查看 0,未查看 1,已下载 2
*/
@ApiModelProperty
(
value
=
"status"
,
example
=
"0"
,
dataType
=
"int"
,
name
=
"通知状态"
,
notes
=
"未查看 0,已查看 1,已下载 2,默认 0"
)
@Column
(
name
=
"status"
)
private
int
status
;
/**
* 通知类型 接受 0,发送 1,草稿 2
*/
@ApiModelProperty
(
value
=
"type"
,
example
=
"0"
,
dataType
=
"int"
,
name
=
"通知类型"
,
notes
=
"接收 0,发送 1,草稿 2,默认 0"
)
@Column
(
name
=
"type"
)
private
int
type
;
/**
* 失效时间
*/
@ApiModelProperty
(
value
=
"deadline"
,
example
=
"2020-02-12 10:23:12"
,
name
=
"通知失效时间"
)
@Column
(
name
=
"deadline"
)
private
Date
deadline
;
/**
* 通知更新时间
*/
@ApiModelProperty
(
value
=
"updateTime"
,
example
=
"2020-02-12 10:23:12"
,
name
=
"通知更新时间"
)
@Column
(
name
=
"update_time"
)
private
Date
updateTime
;
/**
* 是否推送短信 是 0,否 1
*/
@ApiModelProperty
(
value
=
"note"
,
example
=
"0"
,
dataType
=
"int"
,
name
=
"是否推送短信"
)
@Column
(
name
=
"note"
)
private
int
note
;
/**
* 附件列表
*/
@ApiModelProperty
(
value
=
"fileList"
,
example
=
""
,
dataType
=
"list"
,
name
=
"附件列表"
)
@Column
(
name
=
"file_list"
)
private
String
fileList
;
}
efs-bus/src/main/java/com/zjty/efs/bus/service/NoticeService.java
0 → 100644
浏览文件 @
2224160d
package
com
.
zjty
.
efs
.
bus
.
service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.zjty.efs.bus.entity.Notice
;
public
interface
NoticeService
{
/**
* 新增通知
* @param jsonObject 通知json对象
* @return
*/
String
addNotice
(
Notice
jsonObject
);
/**
* 修改通知
* @param jsonObject 通知json对象
* @return
*/
String
updateNotice
(
Notice
jsonObject
);
/**
* 查看通知
* @param id
* @return
*/
String
getNotice
(
int
id
);
/**
* 获取通知列表
* @param user 登录用户
*
* type 通知类型 接受 0,发送 1,草稿 2
*
* @return 通知json对象
*/
String
getReceiveList
(
String
user
,
int
type
);
}
efs-bus/src/main/java/com/zjty/efs/bus/service/impl/NoticeServiceImpl.java
0 → 100644
浏览文件 @
2224160d
package
com
.
zjty
.
efs
.
bus
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.zjty.efs.bus.Dao.NoticeDao
;
import
com.zjty.efs.bus.entity.Notice
;
import
com.zjty.efs.bus.service.NoticeService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
@Service
public
class
NoticeServiceImpl
implements
NoticeService
{
@Autowired
NoticeDao
noticeDao
;
@Override
public
String
addNotice
(
Notice
jsonObject
)
{
return
"成功"
;
}
@Override
public
String
updateNotice
(
Notice
jsonObject
)
{
return
null
;
}
@Override
public
String
getNotice
(
int
id
)
{
return
null
;
}
@Override
public
String
getReceiveList
(
String
user
,
int
type
)
{
return
null
;
}
}
efs-bus/src/main/resources/application.properties
0 → 100644
浏览文件 @
2224160d
##连接mysql
spring.datasource.url
=
jdbc:mysql://localhost:3306/efs-notice?useSSL=false&serverTimezone=UTC&characterEncoding=UTF-8
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
spring.datasource.username
=
root
spring.datasource.password
=
root
spring.jpa.properties.hibernate.format_sql
=
true
spring.main.allow-bean-definition-overriding
=
true
spring.jpa.hibernate.ddl-auto
=
update
spring.jpa.show-sql
=
true
spring.jpa.hibernate.naming.implicit-strategy
=
org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyJpaImpl
spring.jpa.hibernate.naming.physical-strategy
=
org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
spring.jpa.database-platform
=
org.hibernate.dialect.MySQL5InnoDBDialect
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone
=
GMT+8
#
spring.jackson.serialization.write-dates-as-timestamps
=
false
\ No newline at end of file
efs-misc/pom.xml
浏览文件 @
2224160d
...
@@ -47,6 +47,21 @@
...
@@ -47,6 +47,21 @@
<artifactId>
springfox-bean-validators
</artifactId>
<artifactId>
springfox-bean-validators
</artifactId>
<version>
${swagger.version}
</version>
<version>
${swagger.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-core
</artifactId>
<version>
2.8.0
</version>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-spi
</artifactId>
<version>
2.8.0
</version>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-spring-web
</artifactId>
<version>
2.8.0
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论