| | |
| | | class DeviceReceivingApplicationTests { |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private VwCjScSjTsBbService vwCjScSjTsBbService; |
| | | |
| | |
| | | try { |
| | | long currentTime = System.currentTimeMillis() / 1000; |
| | | long oneDaySeconds = 86400; |
| | | long thirtyDaysSeconds = 30 * oneDaySeconds; |
| | | |
| | | long endTime = (currentTime / oneDaySeconds) * oneDaySeconds - 1; |
| | | long startTime = endTime - oneDaySeconds + 1; |
| | | |
| | | // 验证时间跨度不超过30天 |
| | | long timeSpan = endTime - startTime; |
| | | if (timeSpan > thirtyDaysSeconds) { |
| | | System.out.println("✗ 时间跨度超过30天限制: " + (timeSpan / oneDaySeconds) + "天"); |
| | | return; |
| | | } |
| | | |
| | | System.out.println(" - 开始时间: " + new java.util.Date(startTime * 1000)); |
| | | System.out.println(" - 结束时间: " + new java.util.Date(endTime * 1000)); |
| | | |