后台:添加服务器列表

This commit is contained in:
luying
2021-06-15 11:46:49 +08:00
parent 0be64c0244
commit 1d6a391874
6 changed files with 55 additions and 2 deletions
+12
View File
@@ -38,6 +38,18 @@ export default class Game extends Service {
});
}
public async getServerList() {
const { ctx } = this;
const { page, pageSize, sortField, sortOrder, id, serverId, name, groupName, groupId, serverType } = ctx.request.body;
const list = await ServerlistModel.findByCondition(page, pageSize, sortField, sortOrder, id, serverId, name, groupName, groupId, serverType);
const total = await ServerlistModel.countByCondition( id, serverId, name, groupName, groupId, serverType)
return ctx.service.utils.resResult(STATUS.SUCCESS, {
list, total
});
}
public async getDicHero() {
let list: DicHero[] = [];
for(let [heroId, hero] of gameData.hero) {