✨ feat(db): 修改role表数据库操作方式
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { RoleModel, RoleType } from '../../db/Role';
|
||||
import Role, { RoleType } from '../../db/Role';
|
||||
import { pinus, FrontendOrBackendSession } from 'pinus';
|
||||
import { resResult, shouldRefresh } from '../../pubUtils/util';
|
||||
import { STATUS, TASK_TYPE, TASK_FUN_TYPE, SHOP_REFRESH_TYPE, WAR_TYPE, PUSH_ROUTE, POP_UP_SHOP_CONDITION_TYPE } from '../../consts';
|
||||
@@ -195,7 +195,7 @@ export async function checkTaskInComBattleStart(roleStatus: RoleStatus[], capId:
|
||||
console.log('********', JSON.stringify(roleStatus), capId, blueprtId)
|
||||
for (let { roleId, isRobot } of roleStatus) {
|
||||
if (!isRobot) {
|
||||
let role = await RoleModel.findByRoleId(roleId);
|
||||
let role = await Role.findByRoleId(roleId);
|
||||
let task = new CheckTask(role.serverId, roleId);
|
||||
task.setRole(role);
|
||||
if (roleId == capId && roleStatus.length > 1) { // 招募队友
|
||||
@@ -213,7 +213,7 @@ export async function checkTaskInComBattleStart(roleStatus: RoleStatus[], capId:
|
||||
export async function checkTaskInComBattleEnd(roleStatus: RoleStatus[], capId: string) {
|
||||
for (let { roleId, isRobot } of roleStatus) {
|
||||
if (!isRobot) {
|
||||
let role = await RoleModel.findByRoleId(roleId);
|
||||
let role = await Role.findByRoleId(roleId);
|
||||
let task = new CheckTask(role.serverId, roleId);
|
||||
task.setRole(role);
|
||||
if (roleId == capId && roleStatus.length > 1) { // 招募队友
|
||||
|
||||
Reference in New Issue
Block a user