feat : site
This commit is contained in:
@@ -74,4 +74,25 @@ class AdminUser extends Model
|
||||
{
|
||||
return $this->where('id', $id)->where('is_del',UserCode::IS_NO_DEL)->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有数据
|
||||
* @param array $ids
|
||||
* @return array
|
||||
*/
|
||||
public function getDataByIds(array $ids): array
|
||||
{
|
||||
$data = $this->whereIn('id',$ids)->get();
|
||||
if (empty($data)){
|
||||
return [];
|
||||
}
|
||||
|
||||
$res = [];
|
||||
foreach ($data->toArray() as $one)
|
||||
{
|
||||
$res[$one['id']] = $one;
|
||||
}
|
||||
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user