wanxl 1 vuosi sitten
vanhempi
commit
4167e38fdc

BIN
modelProject.zip


+ 1 - 1
src/main/java/com/template/common/mqtt/PushCallback.java

@@ -100,7 +100,7 @@ public class PushCallback implements MqttCallback {
             switch (arr[i]){
                 case "Temperature":
                     records.setType("Temperature");
-                    records.setValue((double) Integer.parseInt(content.substring(10,14), 16)/10);
+                    records.setValue((double) Integer.parseInt(content.substring(10,14), 16)/100);
                     records.setCreateAt(new Date());
                     records.setUpdateAt(new Date());
                     break;

+ 4 - 3
src/main/java/com/template/scheduled/ScheduledService.java

@@ -213,11 +213,11 @@ public class ScheduledService {
         logger.info("查询accesstoken返回结果:"+accessToken);
         List<Devices> devicesList = devicesService.list(new QueryWrapper<>());
         for (Devices devices:devicesList){
-            String[] arr=devices.getDeviceSerial().split(",");
-            if (arr==null||arr.length<1){
+            if (devices.getDeviceSerial()==null||devices.getDeviceSerial().length()<1){
                 continue;
             }
-            StringBuffer picbuffer=new StringBuffer();
+            String[] arr=devices.getDeviceSerial().split(",");
+            StringBuffer picbuffer=new StringBuffer(devices.getPicture());
             for (int i = 0; i <arr.length ; i++) {
                 String requestUrl=url+"/index/api/addStreamProxy?secret="+accessToken+
                         "&vhost="+"http://nyfc.chuanghai-tech.com/liveStream"+"&app=live" +
@@ -230,6 +230,7 @@ public class ScheduledService {
                 JSONObject jsonObject = JSONObject.parseObject(result);
                 String status = String.valueOf(jsonObject.get("code"));
                 if("0".equals(status)){
+                    picbuffer=new StringBuffer();
                     String picUrl =jsonObject.getJSONObject("data").getString("key")+".live.mp4";
                     if (i!=0){
                         picbuffer.append(",");

+ 2 - 2
src/main/resources/application-dev.yml

@@ -43,8 +43,8 @@ mybatis-plus:
   mapper-locations: classpath:/mapper/template/*.xml
   configuration:
   #    #开启sql打印
-  #    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-  #    #关闭sql打印
+#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    #    #关闭sql打印
     log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
   global-config:
     db-config:

+ 2 - 2
src/main/resources/application-prod.yml

@@ -36,11 +36,11 @@ spring:
   # \u914D\u7F6E\u65E5\u5FD7
 mybatis-plus:
   mapper-locations: classpath:/mapper/template/*.xml
-#  configuration:
+  configuration:
 #    #开启sql打印
 #    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
 #    #关闭sql打印
-#    log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
+    log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
   global-config:
     db-config:
       logic-delete-value: 1