tongshanglei 1 год назад
Родитель
Сommit
6ef7a1e28c
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      task_script/LIVESTOCK_MQTT_PUBLISH.php

+ 4 - 1
task_script/LIVESTOCK_MQTT_PUBLISH.php

@@ -9,7 +9,7 @@ define('PORT', '6379');
 define('PASSWORD', '7e2b5c91e438be3c!');
 define('DATABASE', 4);
 
-
+use \think\facade\Db;
 function app_redis()
 {
     static $redis = null;
@@ -105,5 +105,8 @@ while (1) {
     $config_json=json_encode($config);
     var_dump($config_json);
     $res=sendConfig($topic,$config_json);
+    if($res){
+        Db::table('send_config_log')->where('id',$data['msgid'])->update(['result'=>'1']);
+    }
     var_dump($res);
 }