wushunjie
吴顺杰 1 month ago
parent d829361897
commit cb5fdf5676

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

@ -146,9 +146,12 @@ public class AlarmServiceImpl extends ServiceImpl<AlarmMapper, Alarm> implements
public String getToken() {
String accessToken = null;
String body = HttpRequest.get(getToken)
.header("Authorization", "Basic Qk5qUDlTOHAyRUpaeXQxVUYrRDZrQ3NLNlpWYXB5S3FpR3phckVkc1ozUW1JV29WZEI3WWtyWDJHQkFtQ0RPMTZ0US9hazg2cFpnUDVaUzNzNEVHZGNvPTpBTTRvTU9zSmowVUxBVU9PWGx6NXhIaklGNGtwOVc2M2FqWnJYeFRHTEhFbg==")
.header("Authorization", "Basic QkZTaFQzL1d3UGhaSlFkTDhlNEZkblExMWgwUU9lS3FCZG4reGVzQ1NKR2xESEtQazVmeG5tbkxrMW9ua20zWXpkZmpFMGdMR0VaN0g3dmZMczIxc0dNPTpHdGJnUmZOSW1Yam1CcVcwbnB4VWlHaS9zMG1iNVpkdlhBTnFVQ2dtSW00PQ==")
.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);
Object response = json.get("response");
if (BeanUtil.isNotEmpty(response)) {

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

Loading…
Cancel
Save