|
|
@@ -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;
|
|
|
}
|
|
|
|
|
|
|