增加发布者统计

This commit is contained in:
李志强 2025-06-09 12:04:09 +08:00
parent 7a1999ba64
commit d4dc6f3018

View File

@ -261,6 +261,16 @@ class ProgramController extends BaseController
];
}
// 添加上传者的资源数和文章数统计
$uploaderInfo['resource_count'] = Resources::where('uploader', $program['uploader'])
->where('delete_time', null)
->where('status', 1)
->count();
$uploaderInfo['article_count'] = Articles::where('author', $program['uploader'])
->where('delete_time', null)
->where('status', 2)
->count();
// 处理资源size
if (empty($program['size'])) {
$attachment = Attachments::where('src', $program['icon'])