This commit is contained in:
aozhiwei 2024-11-08 15:26:57 +08:00
parent 89eeb7fab1
commit d10a78bdda

View File

@ -33,6 +33,7 @@ class CircuitRankingService extends BaseService {
foreach ($rows as $row) {
$androidHash[$row['account_id']] = $row;
}
$androidHashDb = self::getAndroidHashDb($androidHash);
if (count($androidHash) < 100) {
for ($i = count($androidHash); $i < 100; $i++) {
@ -40,6 +41,24 @@ class CircuitRankingService extends BaseService {
}
}
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',