1
This commit is contained in:
parent
c8bd67d489
commit
7073ea4f04
@ -1255,6 +1255,30 @@ class BattleController extends BaseAuthedController {
|
||||
$roomUuid = getReqVal('room_uuid', '');
|
||||
$usedNum = getReqVal('used_num', 0);
|
||||
$allocBoxNum = getReqVal('alloc_box_num', 0);
|
||||
$row = SqlHelper::ormSelectOne(
|
||||
$this->_getSelfMysql(),
|
||||
't_box_alloc',
|
||||
array(
|
||||
'room_uuid' => $roomUuid,
|
||||
)
|
||||
);
|
||||
if (empty($row)) {
|
||||
myself()->_rspOk();
|
||||
return;
|
||||
}
|
||||
SqlHelper::update(
|
||||
$this->_getSelfMysql(),
|
||||
't_box_alloc',
|
||||
array(
|
||||
'room_uuid' => $roomUuid,
|
||||
),
|
||||
array(
|
||||
'used_num' => $usedNum,
|
||||
'return_account_id' => myself()->_getAccountId(),
|
||||
'return_time' => myself()->_getNowTime(),
|
||||
)
|
||||
);
|
||||
myself()->_rspOk();
|
||||
}
|
||||
|
||||
private function getAlreadyAllocBoxNum()
|
||||
|
Loading…
x
Reference in New Issue
Block a user