32 lines
834 B
PHP
32 lines
834 B
PHP
<?php
|
|
|
|
require_once('services/BattleDataService.php');
|
|
|
|
use phpcommon\SqlHelper;
|
|
|
|
class BattleController extends BaseAuthedController {
|
|
|
|
public function battleReport()
|
|
{
|
|
$userInfo = $this->_getOrmUserInfo();
|
|
if (!$userInfo) {
|
|
$this->_rspErr(1, '没有这个玩家1');
|
|
return;
|
|
}
|
|
$battleDataService = new services\BattleDataService();
|
|
$battleDataService->updateBattleData();
|
|
SqlHelper::insert(
|
|
$this->_getSelfMysql(),
|
|
't_battle_record',
|
|
array(
|
|
'account_id' => $this->_getAccountId(),
|
|
'request' => json_encode($_REQUEST),
|
|
'createtime' => $this->_getNowTime(),
|
|
'modifytime' => $this->_getNowTime(),
|
|
)
|
|
);
|
|
$this->_rspOk();
|
|
}
|
|
|
|
}
|