Browse Source

none CydInfo error message

ggsong 3 years ago
parent
commit
f894e86337
2 changed files with 5 additions and 2 deletions
  1. 3 1
      app/api/controller/v1/Cyd.php
  2. 2 1
      config/status.php

+ 3 - 1
app/api/controller/v1/Cyd.php

@@ -17,7 +17,9 @@ class Cyd
         //todo validate
         //todo validate
 
 
         $result = (new CydBus())->getCydList($task_id);
         $result = (new CydBus())->getCydList($task_id);
-
+        if ($result['total'] == 0) {
+            return showError(config('status.none_cyd_info'));
+        }
         return showSuccess($result);
         return showSuccess($result);
     }
     }
 }
 }

+ 2 - 1
config/status.php

@@ -40,5 +40,6 @@ return [
     //api-validate异常抛出
     //api-validate异常抛出
     'err_validate'=>'999',
     'err_validate'=>'999',
 
 
-
+    //抽样单相关错误
+    'none_cyd_info'=>['4004','无抽样单信息']
 ];
 ];