Parcourir la source

wesmiler 报恩寺项目

wesmiler il y a 4 ans
Parent
commit
4c048c846d
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      app/Services/DevicesService.php

+ 2 - 1
app/Services/DevicesService.php

@@ -194,10 +194,11 @@ class DevicesService extends BaseService
         RedisService::set($errorKey.':result', $result, 3600);
 
         // 更新灯状态
-        if($result == 'True'){
+        if($result && trim($result) == 'True'){
             GongdengOrderModel::where('order_sn', $orderSn)->update(['lamp_status'=> 2,'device_num'=> $deviceLampNo,'params'=> json_encode($data, 256)]);
             return true;
         }else{
+            GongdengOrderModel::where('order_sn', $orderSn)->update(['device_num'=> $deviceLampNo,'params'=> json_encode($data, 256)]);
             return false;
         }