服务器时区查询接口

This commit is contained in:
2025-08-14 09:53:46 +08:00
parent c04c764ade
commit 4319f97a5c

View File

@ -25,16 +25,11 @@ import io.swagger.annotations.ApiOperation;
import jodd.util.StringUtil; import jodd.util.StringUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
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.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.text.SimpleDateFormat;
import java.util.Calendar; import java.util.*;
import java.util.Date;
import java.util.List;
/** /**
@ -59,6 +54,12 @@ public class AutoDeviceCurveController {
@Autowired @Autowired
DeviceTypeColService deviceTypeColService; DeviceTypeColService deviceTypeColService;
@GetMapping("/time")
@TokenIgnore
public String checkTime() {
return "时区:" + TimeZone.getDefault().getID() +
" | 时间:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").format(new Date());
}
@PostMapping("queryCurve") @PostMapping("queryCurve")
@ApiOperation(value = "查询两个曲线的差值/查询单条曲线") @ApiOperation(value = "查询两个曲线的差值/查询单条曲线")