wushunjie
吴顺杰 3 months ago
parent d829361897
commit cb5fdf5676

@ -150,8 +150,10 @@ public class AlarmQuartz {
} }
// 获取数据库中最新的时间 // 获取数据库中最新的时间
LocalDateTime nowTime = alarmService.findNowTime(); LocalDateTime nowTime = alarmService.findNowTime();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmm"); log.info("==========================获取数据库中最新的时间{}", nowTime);
String yesterdayStr = nowTime.format(formatter) + "00"; DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
String yesterdayStr = nowTime.format(formatter);
log.info("==========================格式化后最新的时间{}", yesterdayStr);
// 定义起始页 // 定义起始页
int pageIndex = 1; int pageIndex = 1;
// 定义每页显示条数 // 定义每页显示条数

@ -146,9 +146,12 @@ public class AlarmServiceImpl extends ServiceImpl<AlarmMapper, Alarm> implements
public String getToken() { public String getToken() {
String accessToken = null; String accessToken = null;
String body = HttpRequest.get(getToken) String body = HttpRequest.get(getToken)
.header("Authorization", "Basic Qk5qUDlTOHAyRUpaeXQxVUYrRDZrQ3NLNlpWYXB5S3FpR3phckVkc1ozUW1JV29WZEI3WWtyWDJHQkFtQ0RPMTZ0US9hazg2cFpnUDVaUzNzNEVHZGNvPTpBTTRvTU9zSmowVUxBVU9PWGx6NXhIaklGNGtwOVc2M2FqWnJYeFRHTEhFbg==") .header("Authorization", "Basic QkZTaFQzL1d3UGhaSlFkTDhlNEZkblExMWgwUU9lS3FCZG4reGVzQ1NKR2xESEtQazVmeG5tbkxrMW9ua20zWXpkZmpFMGdMR0VaN0g3dmZMczIxc0dNPTpHdGJnUmZOSW1Yam1CcVcwbnB4VWlHaS9zMG1iNVpkdlhBTnFVQ2dtSW00PQ==")
.header("Content-Type", "application/json") .header("Content-Type", "application/json")
.form("grant_type", "client_credentials").execute().body(); .form("grant_type", "client_credentials")
.form("clientSecret", "GtbgRfNImXjmBqW0npxUiGi/s0mb5ZdvXANqUCgmIm4=")
.form("clientId", "BFShT3/WwPhZJQdL8e4FdnQ11h0QOeKqBdn+xesCSJGlDHKPk5fxnmnLk1onkm3YzdfjE0gLGEZ7H7vfLs21sGM=")
.execute().body();
JSONObject json = JSONObject.parse(body); JSONObject json = JSONObject.parse(body);
Object response = json.get("response"); Object response = json.get("response");
if (BeanUtil.isNotEmpty(response)) { if (BeanUtil.isNotEmpty(response)) {

@ -3,7 +3,7 @@ spring:
datasource: datasource:
url: jdbc:mysql://localhost:3306/algorithms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://localhost:3306/algorithms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: root
password: jichuang@123 password: 123456
driverClassName: com.mysql.cj.jdbc.Driver driverClassName: com.mysql.cj.jdbc.Driver
@ -22,10 +22,10 @@ mybatis-plus:
mapperLocations: classpath*:mapper/yingji/*Mapper.xml mapperLocations: classpath*:mapper/yingji/*Mapper.xml
knife4j: knife4j:
enable: false enable: true
# production: true # production: true
basic: basic:
enable": false enable": true
username: yingji username: yingji
password: Yingji@123. password: Yingji@123.
# openapi: # openapi:

Loading…
Cancel
Save