Revert " feat(db): 修改role表数据库操作方式"

This reverts commit e39af3649288cc5802739cfe862c818fe56e194e.
This commit is contained in:
luying
2023-05-22 19:43:21 +08:00
parent 2d45b2c66c
commit 7bc9e1fe49
79 changed files with 423 additions and 423 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ import { ActivityGrowthFundModel } from "../../db/ActivityGrowthFund";
import { ActivityRefreshTaskModel } from "../../db/ActivityRefreshTask";
import { ActivityThirtyDaysModel } from "../../db/ActivityThirtyDays";
import { ActivityTreasureHuntTaskModel } from "../../db/ActivityTreasureHuntTask";
import Role, { RoleType } from "../../db/Role";
import { RoleModel, RoleType } from "../../db/Role";
import { UserTaskRecModel } from "../../db/UserTaskRec";
import { GrowthFundData } from "../../domain/activityField/growthFundField";
import { RefreshTaskData } from "../../domain/activityField/refreshTaskField";
@@ -84,7 +84,7 @@ export class CheckTask {
}
}
if(!this.roleCreateTime) {
let role = await Role.findByRoleId(this.roleId);
let role = await RoleModel.findByRoleId(this.roleId);
this.role = role;
this.roleCreateTime = role.createTime;
}
+3 -3
View File
@@ -1,4 +1,4 @@
import Role, { RoleType } from '../../db/Role';
import { RoleModel, 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 Role.findByRoleId(roleId);
let role = await RoleModel.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 Role.findByRoleId(roleId);
let role = await RoleModel.findByRoleId(roleId);
let task = new CheckTask(role.serverId, roleId);
task.setRole(role);
if (roleId == capId && roleStatus.length > 1) { // 招募队友