1
This commit is contained in:
parent
3fb7937638
commit
25fc318f02
@ -6,12 +6,40 @@ class GuideController extends BaseAuthedController {
|
||||
|
||||
public function getData()
|
||||
{
|
||||
|
||||
$row = SqlHelper::ormSelectOne(
|
||||
$this->_getSelfMysql(),
|
||||
't_guide_data',
|
||||
array(
|
||||
'account_id' => $this->_getAccountId()
|
||||
)
|
||||
);
|
||||
echo json_encode(array(
|
||||
'errcode' => 0,
|
||||
'errmsg' => "OK",
|
||||
'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()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user