Commit c408f8e6 by 罗志长

feat: 设备时间同步接口

parent 7c4b0748
...@@ -6,10 +6,7 @@ import com.makeit.common.page.PageReqDTO; ...@@ -6,10 +6,7 @@ import com.makeit.common.page.PageReqDTO;
import com.makeit.common.page.PageVO; import com.makeit.common.page.PageVO;
import com.makeit.common.response.ApiResponseEntity; import com.makeit.common.response.ApiResponseEntity;
import com.makeit.common.response.ApiResponseUtils; import com.makeit.common.response.ApiResponseUtils;
import com.makeit.dto.platform.device.PlatDeviceAttrDTO; import com.makeit.dto.platform.device.*;
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.wechat.device.PlatDeviceAttrWechatDTO; import com.makeit.dto.wechat.device.PlatDeviceAttrWechatDTO;
import com.makeit.dto.wechat.device.PlatDeviceNetAttrWechatDTO; import com.makeit.dto.wechat.device.PlatDeviceNetAttrWechatDTO;
import com.makeit.entity.platform.device.PlatDevice; import com.makeit.entity.platform.device.PlatDevice;
...@@ -131,5 +128,17 @@ public class PlatDeviceController { ...@@ -131,5 +128,17 @@ public class PlatDeviceController {
public ApiResponseEntity<PlatAlarmCallDeviceVO> getDeviceRtmToken(@RequestBody PlatCallingDeviceDTO dto) { public ApiResponseEntity<PlatAlarmCallDeviceVO> getDeviceRtmToken(@RequestBody PlatCallingDeviceDTO dto) {
return ApiResponseUtils.success(platDeviceService.getDeviceRtmToken(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);
}
} }
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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment