update:更新删除方法
This commit is contained in:
parent
4f461bb673
commit
8b65690450
@ -14,6 +14,16 @@ trait BaseOptionsTrait
|
|||||||
*/
|
*/
|
||||||
public function getList()
|
public function getList()
|
||||||
{
|
{
|
||||||
|
// 不分页
|
||||||
|
if (property_exists($this, 'paginate') && $this->paginate === false) {
|
||||||
|
return $this->catchSearch()
|
||||||
|
->field('*')
|
||||||
|
->catchOrder()
|
||||||
|
->creator()
|
||||||
|
->select();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页列表
|
||||||
return $this->catchSearch()
|
return $this->catchSearch()
|
||||||
->field('*')
|
->field('*')
|
||||||
->catchOrder()
|
->catchOrder()
|
||||||
@ -93,7 +103,7 @@ trait BaseOptionsTrait
|
|||||||
*/
|
*/
|
||||||
public function deleteBy($id, $force = false)
|
public function deleteBy($id, $force = false)
|
||||||
{
|
{
|
||||||
return static::destroy(Utils::stringToArrayBy($id), $force);
|
return static::destroy(is_array($id) ? $id : Utils::stringToArrayBy($id), $force);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user