|
|
@ -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)) {
|
|
|
|