hid的初始seqId改为10000
This commit is contained in:
@@ -23,7 +23,7 @@ import { Service } from 'egg';
|
||||
import Counter from '@db/Counter';
|
||||
import { STATUS } from '@consts/statusCode';
|
||||
import { getGoodById } from '@pubUtils/gamedata';
|
||||
import { ITID } from '@consts/consts';
|
||||
import { ITID, COUNTER } from '@consts/consts';
|
||||
import Actor from '@pubUtils/actor';
|
||||
|
||||
/**
|
||||
@@ -82,7 +82,7 @@ export default class GMUsers extends Service {
|
||||
|
||||
const roleId = ctx.service.utils.genCode(10);
|
||||
const code = ctx.service.utils.genCode(6);
|
||||
const seqId = await Counter.getNewCounter('role') || -1;
|
||||
const seqId = await Counter.getNewCounter(COUNTER.ROLE) || -1;
|
||||
const role = await RoleModel.createRole(uid, serverId, { roleId, code, roleName, seqId });
|
||||
if (role) {
|
||||
return ctx.service.utils.resResult(STATUS.SUCCESS);
|
||||
@@ -194,7 +194,7 @@ export default class GMUsers extends Service {
|
||||
for(let hid of hids) {
|
||||
let hero = await HeroModel.findByHidAndRole(hid, roleId);
|
||||
if(hero) continue;
|
||||
const seqId = await CounterModel.getNewCounter('hid')||-1;
|
||||
const seqId = await CounterModel.getNewCounter(COUNTER.HID)||-1;
|
||||
let dicHero = ctx.service.utils.getHeroById(hid);
|
||||
if(!dicHero) continue;
|
||||
const heroInfo = {
|
||||
@@ -243,7 +243,7 @@ export default class GMUsers extends Service {
|
||||
flag = 1, msg = "未找到装备" + eid;
|
||||
break;
|
||||
}
|
||||
const seqId = await CounterModel.getNewCounter('eid')||-1;
|
||||
const seqId = await CounterModel.getNewCounter(COUNTER.EID)||-1;
|
||||
const equipInfo = {
|
||||
roleId,
|
||||
roleName: role.roleName,
|
||||
|
||||
Reference in New Issue
Block a user