🐞 fix(gvg): 修复战区分配错误
This commit is contained in:
@@ -20,9 +20,9 @@ export default class GVGServerGroup extends BaseModel {
|
||||
const serverGroup: { serverId: number, groupId: number }[] = await GVGServerGroupModel.aggregate([
|
||||
{ $match: { time: { $lte: time } } },
|
||||
{ $sort: { time: -1 } },
|
||||
{ $group: { _id: "$id", serverId: { $first: "$serverId" }, groupId: { $first: "$groupId" }, time: { $first: "$time" }} },
|
||||
{ $group: { _id: "$serverId", serverId: { $first: "$serverId" }, groupId: { $first: "$groupId" }, time: { $first: "$time" }} },
|
||||
{ $sort: { _id: -1 } },
|
||||
{ $project: { _id: 0, id: "$_id", serverId: "$serverId", groupId: "$groupId", time: "$time" } }
|
||||
{ $project: { _id: 0, serverId: "$serverId", groupId: "$groupId", time: "$time" } }
|
||||
]);
|
||||
return serverGroup;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user