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
7719ef3c
authored
Nov 27, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
feat:设备日志推送到oss
parent
3e2f79e2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
6 deletions
saas-module/src/main/java/com/makeit/controller/device/SaasDeviceController.java
server-service/src/main/java/com/makeit/service/platform/device/PlatDeviceService.java
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
server-web/src/main/resources/application.yml
saas-module/src/main/java/com/makeit/controller/device/SaasDeviceController.java
View file @
7719ef3c
...
@@ -19,10 +19,8 @@ import com.makeit.vo.platform.device.PlatDeviceListVO;
...
@@ -19,10 +19,8 @@ import com.makeit.vo.platform.device.PlatDeviceListVO;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.List
;
...
@@ -91,4 +89,12 @@ public class SaasDeviceController {
...
@@ -91,4 +89,12 @@ public class SaasDeviceController {
return
ApiResponseUtils
.
success
();
return
ApiResponseUtils
.
success
();
}
}
@ApiOperation
(
"设备日志推送"
)
@PostMapping
(
"devicePushLog"
)
@TenantIdIgnore
public
ApiResponseEntity
devicePushLog
(
@RequestParam
(
value
=
"file"
,
required
=
false
)
MultipartFile
multipartFile
)
{
platDeviceService
.
devicePushLog
(
multipartFile
);
return
ApiResponseUtils
.
success
();
}
}
}
server-service/src/main/java/com/makeit/service/platform/device/PlatDeviceService.java
View file @
7719ef3c
...
@@ -16,6 +16,7 @@ import com.makeit.shengwang.agora.vo.PlatAlarmCallDeviceVO;
...
@@ -16,6 +16,7 @@ import com.makeit.shengwang.agora.vo.PlatAlarmCallDeviceVO;
import
com.makeit.vo.platform.device.PlatChildDeviceListVO
;
import
com.makeit.vo.platform.device.PlatChildDeviceListVO
;
import
com.makeit.vo.platform.device.PlatDeviceListVO
;
import
com.makeit.vo.platform.device.PlatDeviceListVO
;
import
com.makeit.vo.platform.device.PlatDeviceViewVO
;
import
com.makeit.vo.platform.device.PlatDeviceViewVO
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.List
;
import
java.util.List
;
...
@@ -88,4 +89,6 @@ public interface PlatDeviceService extends IService<PlatDevice> {
...
@@ -88,4 +89,6 @@ public interface PlatDeviceService extends IService<PlatDevice> {
PlatAlarmCallDeviceVO
getDeviceRtmToken
(
PlatCallingDeviceDTO
dto
);
PlatAlarmCallDeviceVO
getDeviceRtmToken
(
PlatCallingDeviceDTO
dto
);
PlatAlarmCallDeviceVO
callingDevice
(
PlatCallingDeviceDTO
dto
);
PlatAlarmCallDeviceVO
callingDevice
(
PlatCallingDeviceDTO
dto
);
void
devicePushLog
(
MultipartFile
multipartFile
);
}
}
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
View file @
7719ef3c
...
@@ -77,6 +77,7 @@ import org.springframework.beans.BeanUtils;
...
@@ -77,6 +77,7 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.time.ZoneOffset
;
import
java.time.ZoneOffset
;
...
@@ -792,4 +793,9 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
...
@@ -792,4 +793,9 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
public
PlatAlarmCallDeviceVO
getDeviceRtmToken
(
PlatCallingDeviceDTO
dto
)
{
public
PlatAlarmCallDeviceVO
getDeviceRtmToken
(
PlatCallingDeviceDTO
dto
)
{
return
shengwangService
.
callingDeviceAuthIgnoreRtm
(
dto
);
return
shengwangService
.
callingDeviceAuthIgnoreRtm
(
dto
);
}
}
@Override
public
void
devicePushLog
(
MultipartFile
multipartFile
)
{
}
}
}
server-web/src/main/resources/application.yml
View file @
7719ef3c
...
@@ -14,8 +14,8 @@ spring:
...
@@ -14,8 +14,8 @@ spring:
idle-timeout
:
60000
idle-timeout
:
60000
login-timeout
:
5
login-timeout
:
5
max-lifetime
:
60000
max-lifetime
:
60000
maximum-pool-size
:
1
0
maximum-pool-size
:
5
0
minimum-idle
:
5
minimum-idle
:
10
read-only
:
false
read-only
:
false
#jackson时间格式化
#jackson时间格式化
...
...
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