game2005api/webapp/controller/BattleController.class.php
aozhiwei 53d5818e08 1
2021-12-15 11:30:30 +08:00

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();
}
}