diff --git a/extend/controller/BasicAdmin.php b/extend/controller/BasicAdmin.php index 65ec789ea..c9e12a492 100644 --- a/extend/controller/BasicAdmin.php +++ b/extend/controller/BasicAdmin.php @@ -105,7 +105,7 @@ class BasicAdmin extends Controller { } // 列表数据查询与显示 if (null === $db->getOptions('order')) { - $fields = $db->getTableFields(['table' => $db->getTable()]); + $fields = $db->getTableFields($db->getTable()); in_array('sort', $fields) && $db->order('sort asc'); } $result = array(); diff --git a/extend/service/DataService.php b/extend/service/DataService.php index 98fcffdac..2a33d11ea 100644 --- a/extend/service/DataService.php +++ b/extend/service/DataService.php @@ -95,7 +95,7 @@ class DataService { // 删除模式,如果存在 is_deleted 字段使用软删除 if ($field === 'delete') { if (method_exists($db, 'getTableFields')) { - if (in_array('is_deleted', $db->getTableFields(['table' => $db->getTable()]))) { + if (in_array('is_deleted', $db->getTableFields($db->getTable()))) { return false !== $db->where($where)->update(['is_deleted' => 1]); } } @@ -105,4 +105,4 @@ class DataService { return false !== $db->where($where)->update([$field => $value]); } -} \ No newline at end of file +}