✨ feat(录像): 修改录像上传逻辑

This commit is contained in:
luying
2023-04-18 11:35:34 +08:00
parent 180b215b2e
commit 81260bb695
13 changed files with 46 additions and 25 deletions
+5 -2
View File
@@ -65,6 +65,9 @@ export default class GVGVestigeRec extends BaseModel {
@prop({ required: true, default: false })
hasRpl: boolean; // 是否存在对应录像
@prop({ required: true, default: false })
remoteUrl: string; // 录像文件
public static async createRec(configId: number, vestigeId: number, groupKey: string, warId: number, attackInfo: OppPlayerInfo, defenseInfo: OppPlayerInfo, leagueGoods: LeagueGood[]) {
const battleCode = genCode(10);
const result: GVGVestigeRecType = await GVGVestigeRecModel.findOneAndUpdate({ battleCode }, {
@@ -110,8 +113,8 @@ export default class GVGVestigeRec extends BaseModel {
}
public static async updateRplStatus(battleCode: string, hasRpl: boolean) {
let result: GVGVestigeRecType = await GVGVestigeRecModel.findOneAndUpdate({ battleCode }, { hasRpl }, { new: true }).lean();
public static async updateRplStatus(battleCode: string, hasRpl: boolean, remoteUrl: string) {
let result: GVGVestigeRecType = await GVGVestigeRecModel.findOneAndUpdate({ battleCode }, { hasRpl, remoteUrl }, { new: true }).lean();
return result;
}