改名
This commit is contained in:
parent
eaed9c83ef
commit
56979d8e7d
@ -104,6 +104,15 @@ class BagController extends BaseAuthedController {
|
|||||||
{
|
{
|
||||||
$itemDto = Bag::findByType(mt\Item::FUNC_TYPE, mt\Item::FUNC_RENAME_CARD_SUBTYPE);
|
$itemDto = Bag::findByType(mt\Item::FUNC_TYPE, mt\Item::FUNC_RENAME_CARD_SUBTYPE);
|
||||||
$userInfo = $this->_getOrmUserInfo();
|
$userInfo = $this->_getOrmUserInfo();
|
||||||
|
if ($userInfo['rename_count'] == 0){
|
||||||
|
$errCode = 0;
|
||||||
|
$errMsg = '';
|
||||||
|
$this->internalRename(getReqVal('name', ''), getReqVal('name_sign', ''), $errCode, $errMsg);
|
||||||
|
if ($errCode) {
|
||||||
|
$this->_rspErr($errCode, $errMsg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
if (!$itemDto || $itemDto['item_num'] < 0) {
|
if (!$itemDto || $itemDto['item_num'] < 0) {
|
||||||
if (mt\Parameter::getVal('rename_diamond_cost', 0) <= 0) {
|
if (mt\Parameter::getVal('rename_diamond_cost', 0) <= 0) {
|
||||||
$this->_rspErr(1, 'config error');
|
$this->_rspErr(1, 'config error');
|
||||||
@ -138,6 +147,8 @@ class BagController extends BaseAuthedController {
|
|||||||
));
|
));
|
||||||
$this->propertyChgService->addBagChg();
|
$this->propertyChgService->addBagChg();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->propertyChgService->addUserChg();
|
$this->propertyChgService->addUserChg();
|
||||||
$this->_rspData(array(
|
$this->_rspData(array(
|
||||||
'property_chg' => $this->propertyChgService->toDto(),
|
'property_chg' => $this->propertyChgService->toDto(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user