🐞 fix(gvg): 可能可以修好据点锁问题

This commit is contained in:
luying
2023-03-09 10:06:04 +08:00
parent 50a3c7e872
commit 686501d75d
4 changed files with 28 additions and 22 deletions

View File

@@ -46,9 +46,8 @@ export default class GVGCityAreaPoint extends BaseModel {
return result;
}
public static async leavePoint(configId: number, groupKey: string, pointId: number) {
let result: GVGCityAreaPointType = await GVGCityAreaPointModel.findOneAndUpdate({ configId, groupKey, pointId }, { $set: { teamCode: '', roleId: '', roleName: '', leagueCode: '', leagueName: '' }}, { new: true }).lean();
return result;
public static async leavePoint(configId: number, groupKey: string, teamCode: string) {
await GVGCityAreaPointModel.updateMany({ configId, groupKey, teamCode }, { $set: { teamCode: '', roleId: '', roleName: '', leagueCode: '', leagueName: '' }}, { new: true }).lean();
}
public static async playerLeave(configId: number, groupKey: string, roleId: string) {