0806
This commit is contained in:
@@ -32,7 +32,7 @@ $whereSql = implode(' AND ', $where);
|
||||
|
||||
$pdo = DB::getInstance()->getPdo();
|
||||
$stmt = $pdo->prepare(
|
||||
"SELECT sa.id, sa.owner_type, sa.owner_id, sa.platform, sa.account_id, sa.profile_url, sa.remark,
|
||||
"SELECT sa.id, sa.owner_type, sa.owner_id, sa.platform, sa.account_id, sa.profile_url, sa.remark, sa.is_defult,
|
||||
mca.account_level, mca.content_categories, mca.follower_count, mca.avg_read_count,
|
||||
mca.certification_type, sa.created_at,
|
||||
CASE sa.owner_type
|
||||
@@ -52,11 +52,11 @@ header('Content-Type: text/csv; charset=utf-8');
|
||||
header('Content-Disposition: attachment; filename="media_' . date('Ymd_His') . '.csv"');
|
||||
echo "\xEF\xBB\xBF";
|
||||
$out = fopen('php://output', 'w');
|
||||
fputcsv($out, ['ID', '归属类型', '归属ID', '归属名称', '平台', '账号', '主页链接', '备注', '等级', '内容领域', '粉丝数', '平均阅读', '认证类型', '创建时间']);
|
||||
fputcsv($out, ['ID', '归属类型', '归属ID', '归属名称', '平台', '账号', '主页链接', '备注', '是否常用', '等级', '内容领域', '粉丝数', '平均阅读', '认证类型', '创建时间']);
|
||||
foreach ($list as $r) {
|
||||
fputcsv($out, [
|
||||
$r['id'], $r['owner_type'], $r['owner_id'], $r['owner_name'], $r['platform'],
|
||||
$r['account_id'], $r['profile_url'], $r['remark'], $r['account_level'],
|
||||
$r['account_id'], $r['profile_url'], $r['remark'], $r['is_defult'] ? '常用' : '备用', $r['account_level'],
|
||||
$r['content_categories'], $r['follower_count'], $r['avg_read_count'],
|
||||
$r['certification_type'], $r['created_at'],
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user