game2006api/webapp/controller/GuideController.class.php
2022-11-03 11:50:29 +08:00

45 lines
1.1 KiB
PHP

<?php
use phpcommon\SqlHelper;
class GuideController extends BaseAuthedController {
public function getData()
{
$row = SqlHelper::ormSelectOne(
$this->_getSelfMysql(),
't_guide_data',
array(
'account_id' => $this->_getAccountId()
)
);
$this->_rspData(array(
'data' => $row ? $row['data'] : null
));
}
public function setData()
{
$data = getReqVal('data', '');
SqlHelper::upsert(
$this->_getSelfMysql(),
't_guide_data',
array(
'account_id' => $this->_getAccountId(),
),
array(
'data' => $data,
'modifytime' => $this->_getNowTime(),
),
array(
'account_id' => $this->_getAccountId(),
'data' => $data,
'createtime' => $this->_getNowTime(),
'modifytime' => $this->_getNowTime()
)
);
$this->_rspOk();
}
}