This commit is contained in:
aozhiwei 2024-04-16 11:52:53 +08:00
parent a60044fb90
commit c47ad75762

View File

@ -268,9 +268,10 @@ class BattleController extends BaseAuthedController {
}
}
}
error_log(json_encode($realPlayerHash));
$accountIdPair = array();
foreach ($realPlayerHash as $accountId) {
foreach ($realPlayerHashCopy as $accountIdCopy) {
foreach ($realPlayerHash as $accountId => $val) {
foreach ($realPlayerHashCopy as $accountIdCopy => $valCopy) {
if ($accountId != $accountIdCopy) {
$accountId1 = $accountId;
$accountId2 = $accountIdCopy;
@ -285,12 +286,13 @@ class BattleController extends BaseAuthedController {
}
}
}
error_log(json_encode($accountIdPair));
$nowTime = myself()->_getNowTime();
foreach ($accountIdPair as $pair) {
$accountId1 = $pair[0];
$accountId2 = $pair[1];
SqlHelper::Upsert(
myself()->__getRelationDbMysql(),
myself()->_getRelationDbMysql(),
't_recent_battle',
array(
'account_id1' => $accountId1,