后台:活动类型表
This commit is contained in:
@@ -4,6 +4,7 @@ import { GameModel } from './Game';
|
||||
import { CounterModel } from './Counter';
|
||||
import { COUNTER } from '../consts';
|
||||
import { ServerStategyTypeParam } from './ServerStategy';
|
||||
import { getServerName, getServerGroupName } from '../pubUtils/data';
|
||||
|
||||
// 暂时服务器列表是从game表取的,之后会转移到使用这张表,目前用作查询该服战力中位数
|
||||
|
||||
@@ -99,11 +100,11 @@ export default class Serverlist extends BaseModel {
|
||||
if(groupServerCount > 10) {
|
||||
groupId = await CounterModel.getNewCounter(COUNTER.SERVER_GROUP);
|
||||
}
|
||||
let groupName = '逍遥津' + groupId;
|
||||
let groupName = getServerGroupName(groupId)||"";
|
||||
|
||||
let serverId = await CounterModel.getNewCounter({ name: `${COUNTER.SERVER_BY_TYPE.name}_${serverType}`, def: COUNTER.SERVER_BY_TYPE.def });
|
||||
let id = await CounterModel.getNewCounter(COUNTER.SERVER);
|
||||
if(!name) name = '出师表' + id
|
||||
if(!name) name = getServerName(id)||"";
|
||||
|
||||
const doc = new ServerlistModel();
|
||||
const update = Object.assign(doc.toJSON(), params, { id, serverId, host, groupId, groupName, name, createdBy: uid, updatedBy: uid }, { activityGroupId: stategy.activityGroupId, maxPlayerCnt: stategy.maxPlayerCnt});
|
||||
|
||||
Reference in New Issue
Block a user