|
|
@@ -1,10 +1,10 @@
|
|
|
-package com.zhongshu.iot.server.core.service.device;
|
|
|
+package com.zhongshu.iot.server.core.service.iotPlatform.impl;
|
|
|
|
|
|
import com.github.microservice.models.hxz.ServerTimeResult;
|
|
|
+import com.github.microservice.net.ResultContent;
|
|
|
import com.zhongshu.iot.server.core.domain.ExecuteAnnotationService;
|
|
|
import com.zhongshu.iot.server.core.domain.ExecuteAnnotationServiceMethod;
|
|
|
-import com.zhongshu.iot.server.core.service.base.SuperService;
|
|
|
-import com.github.microservice.net.ResultContent;
|
|
|
+import com.zhongshu.iot.server.core.service.iotPlatform.PlatformTopic;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -21,16 +21,21 @@ import java.util.Map;
|
|
|
@Slf4j
|
|
|
@Service
|
|
|
@ExecuteAnnotationService
|
|
|
-public class ServerTimeService extends SuperService {
|
|
|
+public class ServerTimeService implements PlatformTopic {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String topic() {
|
|
|
+ return "/platform/%s/serverTime";
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 云版消费机的使用 (获取系统时间)
|
|
|
*
|
|
|
- * @param str
|
|
|
+ * @param
|
|
|
* @return
|
|
|
*/
|
|
|
@ExecuteAnnotationServiceMethod(value = "ServerTime", remark = "服务器时间")
|
|
|
- public ResultContent ServerTime(String str) {
|
|
|
+ public ResultContent action(String dataId, String message) {
|
|
|
var nowTime = new Date(System.currentTimeMillis());
|
|
|
ServerTimeResult result = new ServerTimeResult();
|
|
|
LocalDate date = LocalDate.now();
|