This commit is contained in:
aozhiwei 2023-06-05 20:04:10 +08:00
parent 155258c96f
commit 6d5ff76434

View File

@ -253,15 +253,7 @@ class UserController extends BaseAuthedController {
$haveHeadHeroList[rand() % count($haveHeadHeroList)]['hero_head'] : 0;
}
//Hero::randHero($heroUniId, $heroId);
SqlHelper::upsert
($this->_getSelfMysql(),
't_user',
array(
'account_id' => $this->_getAccountId()
),
array(
),
array(
$fields = array(
'account_id' => $this->_getAccountId(),
'channel' => $this->_getChannel(),
'name' => $userName,
@ -286,7 +278,20 @@ class UserController extends BaseAuthedController {
'createtime' => $this->_getNowTime(),
'modifytime' => $this->_getNowTime(),
'last_login_time' => $this->_getNowTime(),
)
);
if ($this->_getChannel() == BC_CHANNEL) {
$fields['address'] = $this->_getOpenId();
}
SqlHelper::upsert
($this->_getSelfMysql(),
't_user',
array(
'account_id' => $this->_getAccountId()
),
array(
),
$fields
);
$awardService = new services\AwardService();
$propertyChgService = new services\PropertyChgService();
@ -821,15 +826,7 @@ class UserController extends BaseAuthedController {
private function createNewUserV2($userName){
$currSeasonMeta = mt\RankSeason::getCurrentSeason();
SqlHelper::upsert
($this->_getSelfMysql(),
't_user',
array(
'account_id' => $this->_getAccountId()
),
array(
),
array(
$fields = array(
'account_id' => $this->_getAccountId(),
'channel' => $this->_getChannel(),
'name' => $userName,
@ -846,7 +843,20 @@ class UserController extends BaseAuthedController {
'createtime' => $this->_getNowTime(),
'modifytime' => $this->_getNowTime(),
'last_login_time' => $this->_getNowTime(),
)
);
if ($this->_getChannel() == BC_CHANNEL) {
$fields['address'] = $this->_getOpenId();
}
SqlHelper::upsert
($this->_getSelfMysql(),
't_user',
array(
'account_id' => $this->_getAccountId()
),
array(
),
$fields
);
}