master
ELF 3 years ago
parent 0083679a35
commit af693fc5a8

@ -414,6 +414,10 @@ class TestingResourceService
throw new \Exception('区服不存在'); throw new \Exception('区服不存在');
} }
if (count($records) > 9) {
throw new \Exception('一次不能超过9笔');
}
$role = M('user_play_info', 'tab_') $role = M('user_play_info', 'tab_')
->field(['id', 'role_id', 'promote_id', 'game_id', 'testing_other_quota']) ->field(['id', 'role_id', 'promote_id', 'game_id', 'testing_other_quota'])
->where(['user_id' => $user['id'], 'game_id' => $gameId, 'server_id' => $server['server_id'], 'role_id' => $roleId]) ->where(['user_id' => $user['id'], 'game_id' => $gameId, 'server_id' => $server['server_id'], 'role_id' => $roleId])
@ -545,6 +549,7 @@ class TestingResourceService
'remark' => $record['remark'], 'remark' => $record['remark'],
]; ];
M('testing_resource_order', 'tab_')->add($order); M('testing_resource_order', 'tab_')->add($order);
$i ++;
} }
$model->commit(); $model->commit();
} catch (\Exception $e) { } catch (\Exception $e) {

Loading…
Cancel
Save