mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]修正框架升级后的问题
This commit is contained in:
parent
dcff0e8d1f
commit
e08e427f9d
@ -105,7 +105,7 @@ class BasicAdmin extends Controller {
|
|||||||
}
|
}
|
||||||
// 列表数据查询与显示
|
// 列表数据查询与显示
|
||||||
if (null === $db->getOptions('order')) {
|
if (null === $db->getOptions('order')) {
|
||||||
$fields = $db->getTableFields(['table' => $db->getTable()]);
|
$fields = $db->getTableFields($db->getTable());
|
||||||
in_array('sort', $fields) && $db->order('sort asc');
|
in_array('sort', $fields) && $db->order('sort asc');
|
||||||
}
|
}
|
||||||
$result = array();
|
$result = array();
|
||||||
|
@ -95,7 +95,7 @@ class DataService {
|
|||||||
// 删除模式,如果存在 is_deleted 字段使用软删除
|
// 删除模式,如果存在 is_deleted 字段使用软删除
|
||||||
if ($field === 'delete') {
|
if ($field === 'delete') {
|
||||||
if (method_exists($db, 'getTableFields')) {
|
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]);
|
return false !== $db->where($where)->update(['is_deleted' => 1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user