ZxcZxc123 2 years ago
parent
commit
ec8807e387
1 changed files with 12 additions and 3 deletions
  1. 12 3
      app/model/api/GroupModel.php

+ 12 - 3
app/model/api/GroupModel.php

@@ -89,13 +89,22 @@ class GroupModel extends Model
      * @param array $data 数据
      * @return bool
      */
+//    public function updateAuditStatus($gr_id, $data)
+//    {
+//        $result = $this->where('gr_id', $gr_id)->update($data);
+//        if ($result !== false) {
+//            return true;
+//        }
+//        return false;
+//    }
     public function updateAuditStatus($gr_id, $data)
     {
-        $result = $this->where('gr_id', $gr_id)->update($data);
-        if ($result !== false) {
+        try {
+            $this->where('gr_id', $gr_id)->update($data);
             return true;
+        } catch (\Exception $e) {
+            return false;
         }
-        return false;
     }