|
...
|
...
|
@@ -39,4 +39,23 @@ class AiccWechat extends Model |
|
|
|
{
|
|
|
|
return self::query()->where('project_id', $project_id)->first();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param int $page
|
|
|
|
* @param int $perPage
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function allData(int $page = 1, int $perPage = 15)
|
|
|
|
{
|
|
|
|
$status = 1; # 1 - 正常, 0 - 禁用
|
|
|
|
$lists = self::query()->where('status', $status)
|
|
|
|
->whereNotNull('project_id')
|
|
|
|
->whereNotNull('wx_user_id')
|
|
|
|
->paginate($perPage, ['project_id', 'wx_id', 'wx_user_id'], 'page', $page);
|
|
|
|
$items = $lists->Items();
|
|
|
|
$totalPage = $lists->lastPage();
|
|
|
|
$total = $lists->total();
|
|
|
|
$currentPage = $lists->currentPage();
|
|
|
|
return compact('total', 'items', 'totalPage', 'currentPage');
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|