|
@ -12,6 +12,9 @@ import lombok.RequiredArgsConstructor; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
|
import java.time.Instant; |
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
|
|
|
|
|
@Tag(name = "系统") |
|
|
@Tag(name = "系统") |
|
|
@RestController |
|
|
@RestController |
|
|
@RequestMapping("/api/sys") |
|
|
@RequestMapping("/api/sys") |
|
@ -48,10 +51,10 @@ public class SystemController { |
|
|
return Result.success(); |
|
|
return Result.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Operation(summary = "获取系统时间 yyyy-MM-dd HH:mm:ss") |
|
|
|
|
|
|
|
|
@Operation(summary = "获取系统时间") |
|
|
@GetMapping("/datetime") |
|
|
@GetMapping("/datetime") |
|
|
public Result<?> getDatetime() { |
|
|
public Result<?> getDatetime() { |
|
|
return Result.success(deviceStateService.getDeviceState()); |
|
|
|
|
|
|
|
|
return Result.success(Instant.now().toEpochMilli()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |