|
|
@@ -1,10 +1,9 @@
|
|
|
-package com.kym.miniapp.mq;
|
|
|
+package com.kym.service.awoara;
|
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.alibaba.fastjson2.TypeReference;
|
|
|
import com.kym.common.exception.BusinessException;
|
|
|
import com.kym.common.utils.CommUtil;
|
|
|
-import com.kym.service.awoara.AwoaraService;
|
|
|
import com.kym.service.awoara.entity.ApiList;
|
|
|
import com.kym.service.awoara.entity.Config;
|
|
|
import com.kym.service.awoara.entity.MethodHelp;
|
|
|
@@ -13,6 +12,7 @@ import com.kym.service.awoara.entity.response.AwoaraResponse;
|
|
|
import com.kym.service.awoara.entity.response.CreateOrder;
|
|
|
import com.kym.service.awoara.entity.response.HardwareInfo;
|
|
|
import com.kym.service.awoara.entity.response.State;
|
|
|
+import com.kym.service.mq.AliyunLotClient;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -34,7 +34,7 @@ public class AwoaraServiceImpl implements AwoaraService {
|
|
|
/**
|
|
|
* BASE64解码器
|
|
|
*/
|
|
|
- private static Base64.Decoder decoder = Base64.getDecoder();
|
|
|
+ private static final Base64.Decoder DECODER = Base64.getDecoder();
|
|
|
|
|
|
static <T> T doRequest(String productKey, String deviceName, String params, TypeReference<AwoaraResponse<T>>... typeReference) {
|
|
|
try {
|
|
|
@@ -42,9 +42,9 @@ public class AwoaraServiceImpl implements AwoaraService {
|
|
|
AwoaraResponse<T> res;
|
|
|
if (HTTP_OK == response.getStatusCode()) {
|
|
|
if (CommUtil.isNotEmptyAndNull(typeReference)) {
|
|
|
- res = JSONObject.parseObject(new String(decoder.decode(response.getBody().payloadBase64Byte), StandardCharsets.UTF_8), typeReference[0]);
|
|
|
+ res = JSONObject.parseObject(new String(DECODER.decode(response.getBody().payloadBase64Byte), StandardCharsets.UTF_8), typeReference[0]);
|
|
|
} else {
|
|
|
- res = JSONObject.parseObject(new String(decoder.decode(response.getBody().payloadBase64Byte), StandardCharsets.UTF_8), AwoaraResponse.class);
|
|
|
+ res = JSONObject.parseObject(new String(DECODER.decode(response.getBody().payloadBase64Byte), StandardCharsets.UTF_8), AwoaraResponse.class);
|
|
|
}
|
|
|
if (HTTP_OK == res.getCode()) {
|
|
|
return res.getData();
|
|
|
@@ -244,7 +244,7 @@ public class AwoaraServiceImpl implements AwoaraService {
|
|
|
"light_mode": 2,
|
|
|
"light_time_period.1": "00:00 - 05:30",
|
|
|
"light_time_period.2": "18:30 - 00:00",
|
|
|
- "sound_volume": 60,
|
|
|
+ "sound_volume": 70,
|
|
|
"screen_type": 0,
|
|
|
"video_source": 0,
|
|
|
"video_play_delay": 20,
|
|
|
@@ -252,9 +252,7 @@ public class AwoaraServiceImpl implements AwoaraService {
|
|
|
"bill_delay": 60,
|
|
|
"notice_throshold_idle": 300,
|
|
|
"notice_throshold_operation": 600,
|
|
|
- "motor_mode": 0,
|
|
|
- "tts_open_by_button":"欢迎使用超级进化自助洗车机",
|
|
|
- "tts_open_by_network":"欢迎使用超级进化自助洗车机"
|
|
|
+ "motor_mode": 0
|
|
|
}
|
|
|
}
|
|
|
""";
|