gogs 10 달 전
부모
커밋
3b86ef723e
1개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 5 4
      app/Http/Controllers/Api/DwyController.php

+ 5 - 4
app/Http/Controllers/Api/DwyController.php

@@ -1021,15 +1021,16 @@ class DwyController extends BaseController
 
     public function getTbData(Request $request){
         $data = $request->all();
-        if(empty($data['mac'])) return [201, ''];
-
-        $result = BigKingTbj::where('mac',$data['mac'])->get()->toArray();
+//        if(empty($data['mac'])) return [201, ''];
+        if(empty($data['id'])) return [201, ''];
+        $result = BigKingTbj::where('id',$data['id'])->get()->toArray();
+//        $result = BigKingTbj::where('mac',$data['mac'])->get()->toArray();
         if(empty($result)) return [200,'data' => []];
 
         $return = [];
         foreach ($result as $value){
             $return[] = [
-                'id' => $value['id'],
+//                'id' => $value['id'],
                 'mac' => $value['mac'],
                 'data' => json_decode($value['data'],true),
             ];