Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
86e7c85c
authored
Dec 01, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
feat: 上传oss url
parent
32e634b0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
6 deletions
db/上线后sql/update.sql
server-common/src/main/java/com/makeit/oss/AliyunOSSRepository.java
server-module/src/main/java/com/makeit/module/controller/alarm/PlatAlarmRecordController.java
server-web/src/main/resources/application-dev.yml
server-web/src/main/resources/application-test.yml
db/上线后sql/update.sql
View file @
86e7c85c
ALTER
TABLE
`plat_device_other`
ALTER
TABLE
`plat_device_other`
...
...
@@ -37,4 +37,20 @@ ADD COLUMN `activation_time` int8 COMMENT '激活时间' AFTER `expire_time`;
ALTER
TABLE
`plat_tenant`
ADD
COLUMN
`appid`
varchar
(
64
)
COMMENT
'appid'
AFTER
`url`
,
ADD
COLUMN
`secret`
varchar
(
64
)
COMMENT
'secret'
AFTER
`appid`
;
\ No newline at end of file
ADD
COLUMN
`secret`
varchar
(
64
)
COMMENT
'secret'
AFTER
`appid`
;
CREATE
TABLE
`plat_device_log`
(
`id`
VARCHAR
(
64
)
NOT
NULL
COMMENT
'id'
,
`device_id`
VARCHAR
(
64
)
DEFAULT
NULL
COMMENT
'iot设备sn'
,
`type`
VARCHAR
(
1
)
DEFAULT
NULL
COMMENT
'类型 1 误报'
,
`product_name`
VARCHAR
(
64
)
DEFAULT
NULL
COMMENT
'产品名称'
,
`url`
VARCHAR
(
256
)
DEFAULT
NULL
COMMENT
'日志url'
,
`file_name`
VARCHAR
(
256
)
DEFAULT
NULL
COMMENT
'文件名称'
,
`create_date`
datetime
NOT
NULL
COMMENT
'创建时间'
,
`update_date`
datetime
NOT
NULL
COMMENT
'更新时间'
,
`del_flag`
CHAR
(
1
)
DEFAULT
NULL
COMMENT
'删除标识'
,
`create_by`
VARCHAR
(
64
)
DEFAULT
NULL
COMMENT
'创建人'
,
`update_by`
VARCHAR
(
64
)
DEFAULT
NULL
COMMENT
'更新人'
,
`tenant_id`
varchar
(
64
)
DEFAULT
NULL
COMMENT
' 租户id'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
INNODB
DEFAULT
CHARSET
=
utf8mb4
ROW_FORMAT
=
COMPACT
COMMENT
=
'设备日志'
;
\ No newline at end of file
server-common/src/main/java/com/makeit/oss/AliyunOSSRepository.java
View file @
86e7c85c
...
...
@@ -152,7 +152,7 @@ public class AliyunOSSRepository implements AccessoryRepository {
e
.
printStackTrace
();
}
logger
.
debug
(
"完成向aliyun-oss保存文件: {}"
,
System
.
currentTimeMillis
()
-
begin
);
return
endpoint
+
"/"
+
bucketName
+
"/"
+
accessoryBaseDir
+
"/"
+
path
+
"/"
+
fileName
;
return
endpoint
+
"/"
+
accessoryBaseDir
+
"/"
+
path
+
"/"
+
fileName
;
}
/**
...
...
server-module/src/main/java/com/makeit/module/controller/alarm/PlatAlarmRecordController.java
View file @
86e7c85c
...
...
@@ -59,6 +59,14 @@ public class PlatAlarmRecordController {
return
ApiResponseUtils
.
success
();
}
@PostMapping
(
"misinformation"
)
@AuthIgnore
@TenantIdIgnore
public
ApiResponseEntity
<
Void
>
misinformation1
(
@RequestBody
BaseIdDTO
dto
)
{
platAlarmRecordService
.
misinformation
(
dto
.
getId
());
return
ApiResponseUtils
.
success
();
}
@ApiOperation
(
"未读条数"
)
@PostMapping
(
"unreadCount"
)
public
ApiResponseEntity
<
Integer
>
unreadCount
(
@RequestBody
PlatAlarmRecordQueryDTO
dto
)
{
...
...
server-web/src/main/resources/application-dev.yml
View file @
86e7c85c
...
...
@@ -173,7 +173,7 @@ aliyun:
oss
:
accessKey
:
LTAI5tMjaFCiaYYLmtCLiuMj
secretKey
:
Oq1925mQ8663nxaf83MyoOGAbVM71H
endpoint
:
oss-cn-shenzhen.aliyuncs.com
endpoint
:
kangyang-oss.
oss-cn-shenzhen.aliyuncs.com
bucket
:
kangyang-oss
baseDir
:
kangyang
...
...
server-web/src/main/resources/application-test.yml
View file @
86e7c85c
...
...
@@ -162,7 +162,7 @@ aliyun:
oss
:
accessKey
:
LTAI5tMjaFCiaYYLmtCLiuMj
secretKey
:
Oq1925mQ8663nxaf83MyoOGAbVM71H
endpoint
:
oss-cn-shenzhen.aliyuncs.com
endpoint
:
kangyang-oss.
oss-cn-shenzhen.aliyuncs.com
bucket
:
kangyang-oss
baseDir
:
kangyang
...
...
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