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

View File

@@ -37,6 +37,8 @@ export default class LadderMatchRec extends BaseModel {
@prop({ required: true, default: false })
hasRpl: boolean; // 是否存在对应录像
@prop({ required: true, default: false })
remoteUrl: string; // 录像地址
public static async findByRoleId(roleId: string, getters = false) {
const result: LadderMatchRecType = await LadderMatchRecModel.findOne({ roleId1: roleId }).lean({ getters});
@@ -143,8 +145,8 @@ export default class LadderMatchRec extends BaseModel {
}
public static async updateRplStatus(battleCode: string, hasRpl: boolean) {
let result = await LadderMatchRecModel.findOneAndUpdate({ battleCode }, { hasRpl }, { new: true }).lean();
public static async updateRplStatus(battleCode: string, hasRpl: boolean, remoteUrl: string) {
let result = await LadderMatchRecModel.findOneAndUpdate({ battleCode }, { hasRpl, remoteUrl }, { new: true }).lean();
return result;
}
}