72 lines
2.2 KiB
PHP
72 lines
2.2 KiB
PHP
<?php
|
|
|
|
namespace services;
|
|
|
|
class CircuitRankingService extends BaseService {
|
|
|
|
public static function fillPhaseRanking($currentCircuitMeta, $currentStageMeta)
|
|
{
|
|
$rows = myself()->_callModelStatic('Circuit', 'getCircuitPhaseList',
|
|
$currentStageMeta['circuit_season'],
|
|
$currentStageMeta['circuit_phase']);
|
|
if (count($rows) < 100) {
|
|
return;
|
|
}
|
|
|
|
}
|
|
|
|
public static function fillRanking($currentCircuitMeta)
|
|
{
|
|
$rows = myself()->_callModelStatic('Circuit', 'getCircuitList',
|
|
$currentCircuitMeta['circuit_season']);
|
|
if (count($rows) < 100) {
|
|
return;
|
|
}
|
|
}
|
|
|
|
public static function repairPhaseRanking($currentCircuitMeta)
|
|
{
|
|
$rows = myself()->_callModelStatic('Circuit', 'getCircuitPhaseList',
|
|
$currentStageMeta['circuit_season'],
|
|
$currentStageMeta['circuit_phase']);
|
|
$androidHash = array();
|
|
foreach ($rows as $row) {
|
|
$androidHash[$row['account_id']] = $row;
|
|
}
|
|
$androidHashDb = self::getAndroidHashDb($androidHash);
|
|
if (count($androidHash) < 100) {
|
|
for ($i = count($androidHash); $i < 100; $i++) {
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
public static function getAndroidHashDb($alreadyAndroidHash)
|
|
{
|
|
$androidHash = array();
|
|
$rows = SqlHelper::ormSelectOne
|
|
($this->_getMysql(''),
|
|
't_android',
|
|
array(
|
|
'used' => 0
|
|
)
|
|
);
|
|
foreach ($rows as $row) {
|
|
if (!array_key_exists($row['robot_id'], $alreadyAndroidHash)) {
|
|
$androidHash[$row['robot_id']] = $row;
|
|
}
|
|
}
|
|
return $androidHash;
|
|
}
|
|
|
|
public static function repairRanking($currentCircuitMeta)
|
|
{
|
|
$rows = myself()->_callModelStatic('Circuit', 'getCircuitList',
|
|
$currentCircuitMeta['circuit_season']);
|
|
if (count($rows) < 100) {
|
|
return;
|
|
}
|
|
}
|
|
|
|
}
|