1
This commit is contained in:
parent
34c303d1a4
commit
1580cc814b
@ -133,6 +133,7 @@ class User(object):
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
['property_chg', _common.PropertyChg(), '属性变更'],
|
||||
]
|
||||
},{
|
||||
'name': 'selectFreeItem',
|
||||
|
@ -70,7 +70,7 @@ class UserController extends BaseAuthedController {
|
||||
$userInfo = $this->_getOrmUserInfo();
|
||||
}
|
||||
}
|
||||
|
||||
$this->updateLastSeason($userInfo);
|
||||
$this->_rspData(array(
|
||||
'info' => User::show($userInfo)
|
||||
));
|
||||
@ -618,7 +618,11 @@ class UserController extends BaseAuthedController {
|
||||
);
|
||||
User::update($fields);
|
||||
$this->_setV(TN_RANK_STATUS, 0, 0);
|
||||
$this->_rspOk();
|
||||
$propertyChgService = new services\PropertyChgService();
|
||||
$propertyChgService->addUserChg();
|
||||
$this->_rspData([
|
||||
'property_chg' => $propertyChgService->toDto(),
|
||||
]);
|
||||
}
|
||||
|
||||
public function selectFreeItem(){
|
||||
@ -679,10 +683,6 @@ class UserController extends BaseAuthedController {
|
||||
|
||||
private function createNewUserV2($userName){
|
||||
$currSeasonMeta = mt\RankSeason::getCurrentSeason();
|
||||
// if (!$currSeasonMeta){
|
||||
// $time = $this->_getNowTime() + (86400*10);
|
||||
// $currSeasonMeta = mt\RankSeason::getSeasonByTime($time);
|
||||
// }
|
||||
SqlHelper::upsert
|
||||
($this->_getSelfMysql(),
|
||||
't_user',
|
||||
@ -710,4 +710,15 @@ class UserController extends BaseAuthedController {
|
||||
);
|
||||
}
|
||||
|
||||
private function updateLastSeason($userInfo){
|
||||
if (! $userInfo['last_season_id']){
|
||||
$currSeasonMeta = mt\RankSeason::getCurrentSeason();
|
||||
if ($currSeasonMeta){
|
||||
$this->_updateUserInfo(array(
|
||||
'last_season_id'=>$currSeasonMeta['id'],
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user