hid的初始seqId改为10000
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { FIX_SMS_CODE_TELS } from '@consts/consts';
|
||||
import { FIX_SMS_CODE_TELS, COUNTER } from '@consts/consts';
|
||||
import { CounterModel } from '@db/Counter';
|
||||
import { DEFAULT_HEROES } from '@consts/consts';
|
||||
import { HeroModel } from '@db/Hero';
|
||||
@@ -130,7 +130,7 @@ export default class Auth extends Service {
|
||||
const { uid } = ctx;
|
||||
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) {
|
||||
for (let hid of DEFAULT_HEROES) {
|
||||
@@ -138,7 +138,7 @@ export default class Auth extends Service {
|
||||
if(hero) {
|
||||
continue;
|
||||
}
|
||||
const seqId = await CounterModel.getNewCounter('hid')||-1;
|
||||
const seqId = await CounterModel.getNewCounter(COUNTER.HID)||-1;
|
||||
let dicHero = getHeroInfoById(hid);
|
||||
if(!dicHero) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user