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
c408f8e6
authored
Mar 25, 2024
by
罗志长
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
feat: 设备时间同步接口
parent
7c4b0748
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
4 deletions
server-module/src/main/java/com/makeit/module/controller/device/PlatDeviceController.java
server-service/src/main/java/com/makeit/dto/platform/device/PlatDeviceTimeSyncDTO.java
server-module/src/main/java/com/makeit/module/controller/device/PlatDeviceController.java
View file @
c408f8e6
...
...
@@ -6,10 +6,7 @@ import com.makeit.common.page.PageReqDTO;
import
com.makeit.common.page.PageVO
;
import
com.makeit.common.response.ApiResponseEntity
;
import
com.makeit.common.response.ApiResponseUtils
;
import
com.makeit.dto.platform.device.PlatDeviceAttrDTO
;
import
com.makeit.dto.platform.device.PlatDeviceBindOrgDTO
;
import
com.makeit.dto.platform.device.PlatDeviceEditDTO
;
import
com.makeit.dto.platform.device.PlatDeviceQueryDTO
;
import
com.makeit.dto.platform.device.*
;
import
com.makeit.dto.wechat.device.PlatDeviceAttrWechatDTO
;
import
com.makeit.dto.wechat.device.PlatDeviceNetAttrWechatDTO
;
import
com.makeit.entity.platform.device.PlatDevice
;
...
...
@@ -131,5 +128,17 @@ public class PlatDeviceController {
public
ApiResponseEntity
<
PlatAlarmCallDeviceVO
>
getDeviceRtmToken
(
@RequestBody
PlatCallingDeviceDTO
dto
)
{
return
ApiResponseUtils
.
success
(
platDeviceService
.
getDeviceRtmToken
(
dto
));
}
@ApiOperation
(
"时间同步"
)
@PostMapping
(
"timeSync"
)
@AuthIgnore
@TenantIdIgnore
public
ApiResponseEntity
<
PlatDeviceTimeSyncDTO
>
timeSync
()
{
PlatDeviceTimeSyncDTO
dto
=
new
PlatDeviceTimeSyncDTO
();
dto
.
setReceiveTime
(
System
.
currentTimeMillis
());
dto
.
setSendTime
(
System
.
currentTimeMillis
());
return
ApiResponseUtils
.
success
(
dto
);
}
}
server-service/src/main/java/com/makeit/dto/platform/device/PlatDeviceTimeSyncDTO.java
0 → 100644
View file @
c408f8e6
package
com
.
makeit
.
dto
.
platform
.
device
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
PlatDeviceTimeSyncDTO
{
@ApiModelProperty
(
value
=
"接收时间"
)
private
long
receiveTime
;
@ApiModelProperty
(
value
=
"发送时间"
)
private
long
sendTime
;
}
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