Ver Fonte

修改接口优化

曹鹤洋 há 1 ano atrás
pai
commit
99d70fb512
1 ficheiros alterados com 4 adições e 1 exclusões
  1. 4 1
      application/api/controller/PackagingCountDocument.php

+ 4 - 1
application/api/controller/PackagingCountDocument.php

@@ -389,13 +389,16 @@ class PackagingCountDocument extends Api
         $data = [];
         foreach ($arr as $key => $value){
             if (!isset($req[$value])){
-                $this->error('参数错误',$value,$key+1);
+                continue;
             }
             $data[$value] = $req[$value];
         }
         if (!(isset($req['UniqId']) && trim($req['UniqId'])!='')){
             $this->error('参数错误','UniqId',100);
         }
+        if (count($data)==0){
+            $this->error('参数错误','',111);
+        }
         $data['mod_rq'] = date('Y-m-d H:i:s');
 
         //开启事务