[NplayerInfo]

This commit is contained in:
aozhiwei 2021-07-23 11:59:24 +08:00
parent e52cdaed4a
commit 4fe0431846

View File

@ -201,18 +201,29 @@ class NPlayerInfoController extends BaseAuthedController {
$nickName = $_REQUEST['nickName'];
$conn = $this->getMysql($account_id);
$code = 100;
$itemID = 10106;
$itemNum = 1;
phpcommon\SqlHelper::update
($this->getSelfMysql(),
'user',
array(
'accountid' => $this->getAccountId()
),
array(
'user_name' => $nickName
)
);
$itemArr = array();
$deleteItem = array("item_id"=>$itemID,"item_num"=>$itemNum);
array_push($itemArr,$deleteItem);
$code = $this->deleteItem($deleteItem);
if($code == 100)
{
$this->decItem($itemArr);
error_log("改名测试======".$code);
phpcommon\SqlHelper::update
($this->getSelfMysql(),
'user',
array(
'accountid' => $this->getAccountId()
),
array(
'user_name' => $nickName
)
);
}
$this->sendDataToClient($code,"changeNickName",$nickName);
// $sqlStr = "SELECT * FROM user WHERE accountid=:accountid; ";