This commit is contained in:
aozhiwei 2022-07-01 14:29:40 +08:00
parent 92c54b205a
commit cb09e4497f

View File

@ -109,13 +109,45 @@ class TempToolsController extends BaseController {
$account['name'] = $row['name']; $account['name'] = $row['name'];
} }
} }
echo 'account_id,name,rank,score,time' . "\n"; {
foreach ($accounts as &$account) {
$row = $conn->execQuery(
'SELECT MAX(hero_lv) AS max_hero_lv FROM t_hero WHERE account_id=:account_id',
array(
':account_id' => $account['account_id'],
)
);
$account['max_hero_lv'] = $row['max_hero_lv'];
}
}
{
foreach ($accounts as &$account) {
$row = $conn->execQuery(
'SELECT MAX(quality) AS max_hero_quality FROM t_hero WHERE account_id=:account_id',
array(
':account_id' => $account['account_id'],
)
);
$account['max_hero_quality'] = $row['max_hero_quality'];
}
}
echo 'account_id,name,rank,score,max_hero_lv,max_hero_quality,flag, time' . "\n";
foreach ($accounts as $account) { foreach ($accounts as $account) {
$flag = 0;
if ($type == 3) {
$flag = $account['max_hero_lv'] != $account['score'] ? 1 : 0;
}
if ($type == 4) {
$flag = $account['max_hero_quality'] != $account['score'] ? 1 : 0;
}
echo echo
phpcommon\extractOpenId($account['account_id']) . ',' phpcommon\extractOpenId($account['account_id']) . ','
. $account['name'] . ',' . $account['name'] . ','
. $account['ranked'] . ',' . $account['ranked'] . ','
. $account['score'] . ',' . $account['score'] . ','
. $account['max_hero_lv'] . ','
. $account['max_hero_quality'] . ','
. $flag . ','
. phpcommon\timestamp_to_datetime($account['modifytime']) . phpcommon\timestamp_to_datetime($account['modifytime'])
. "\n"; . "\n";
} }