代码优化
This commit is contained in:
@@ -27,6 +27,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.tio.utils.hutool.StrUtil;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -57,7 +58,8 @@ public class CarMessageListener {
|
||||
|
||||
private static String key = "1234567898765432";
|
||||
|
||||
private String jinjiangUrl = "http://127.0.0.1:6609/";
|
||||
// private String jinjiangUrl = "http://127.0.0.1:6609/";
|
||||
private String jinjiangUrl = "http://192.168.155.42:6609/";
|
||||
|
||||
/**
|
||||
* 心跳
|
||||
@@ -119,6 +121,7 @@ public class CarMessageListener {
|
||||
JSONObject alarmInfoPlate = payload.getJSONObject("AlarmInfoPlate");
|
||||
JSONObject result = alarmInfoPlate.getJSONObject("result");
|
||||
JSONObject plateResult = result.getJSONObject("PlateResult");
|
||||
log.info("临时日志:{}", JSON.toJSONString(plateResult));
|
||||
JSONObject carBrand = plateResult.getJSONObject("car_brand");
|
||||
String license = plateResult.getString("license");
|
||||
String colorType = plateResult.getString("colorType");
|
||||
@@ -150,7 +153,8 @@ public class CarMessageListener {
|
||||
if (null != imgRsp && imgRsp.getInteger("code") == 200) {
|
||||
record.setUrl(imgRsp.getJSONObject("data").getString("url"));
|
||||
}
|
||||
record.setPassTime(DateUtil.date(plateResult.getLong("start_time")));
|
||||
// record.setPassTime(DateUtil.date(plateResult.getLong("start_time")));
|
||||
record.setPassTime(new Date());
|
||||
record.setSn(sn);
|
||||
record.setUniqueNo(id);
|
||||
record.setTriggerType(plateResult.getString("triggerType"));
|
||||
@@ -222,7 +226,8 @@ public class CarMessageListener {
|
||||
if (null != imgRsp && imgRsp.getInteger("code") == 200) {
|
||||
record.setUrl(imgRsp.getJSONObject("data").getString("url"));
|
||||
}
|
||||
record.setPassTime(DateUtil.date(plateResult.getLong("start_time")));
|
||||
// record.setPassTime(DateUtil.date(plateResult.getLong("start_time")));
|
||||
record.setPassTime(new Date());
|
||||
record.setSn(sn);
|
||||
record.setUniqueNo(id);
|
||||
record.setTriggerType(plateResult.getString("triggerType"));
|
||||
|
||||
@@ -1,17 +1,28 @@
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/jl_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
#xa
|
||||
# url: jdbc:mysql://127.0.0.1:3306/xa_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: root
|
||||
# password: Xahg2024.
|
||||
#jl
|
||||
# url: jdbc:mysql://127.0.0.1:3306/jl_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: root
|
||||
# password: JL202509jj
|
||||
#td
|
||||
password: td@JJ2024
|
||||
# url: jdbc:mysql://127.0.0.1:3306/td_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: root
|
||||
# password: td@JJ2024
|
||||
#zr
|
||||
url: jdbc:mysql://192.168.155.42:3306/zr_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: zr202407.J
|
||||
data:
|
||||
redis:
|
||||
host: 127.0.0.1
|
||||
#zr
|
||||
host: 192.168.155.42
|
||||
#xa、jl、td
|
||||
# host: 127.0.0.1
|
||||
port: 6379
|
||||
password:
|
||||
database: 1
|
||||
|
||||
Reference in New Issue
Block a user