mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-05 19:41:44 +08:00
[更新]修正框架升级后的问题
This commit is contained in:
parent
dcff0e8d1f
commit
e08e427f9d
@ -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();
|
||||
|
@ -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]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user