浏览代码

none CydInfo error message

ggsong 3 年之前
父节点
当前提交
f894e86337
共有 2 个文件被更改,包括 5 次插入2 次删除
  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
 
         $result = (new CydBus())->getCydList($task_id);
-
+        if ($result['total'] == 0) {
+            return showError(config('status.none_cyd_info'));
+        }
         return showSuccess($result);
     }
 }

+ 2 - 1
config/status.php

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