lvhao 1 день назад
Родитель
Сommit
fe05126ebd
1 измененных файлов с 9 добавлено и 4 удалено
  1. 9 4
      core/CoreApp/controllers/Beihuogl.php

+ 9 - 4
core/CoreApp/controllers/Beihuogl.php

@@ -609,11 +609,16 @@ class Beihuogl extends Start_Controller {
                     $errors_ids[] = $v['id'];
                 }
             }
-            $this->db->where_in('id', $errors_ids);
-            $this->db->update('bhsq', ['erp_check'=>1]);
+            if(!empty($error_list)){
+                $this->db->where_in('id', $errors_ids);
+                $this->db->update('bhsq', ['erp_check'=>1]);
+            }
+            if(!empty($success_ids)){
+                $this->db->where_in('id', $success_ids);
+                $this->db->update('bhsq', ['erp_check'=>0]);
+            }
 
-            $this->db->where_in('id', $success_ids);
-            $this->db->update('bhsq', ['erp_check'=>0]);
+           
             if(empty($error_list)){
                 echo json_encode(['success'=>true,'msg'=>'校验成功,没有异常信息']);
                 exit;