✨ feat(录像): 修改录像上传逻辑
This commit is contained in:
@@ -360,8 +360,8 @@ export class LadderHandler {
|
||||
let list = await LadderMatchRecModel.findRecentRec(roleId, <number>getTimeFunM().getBeforeDay(2));
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
list: list.map(rec => {
|
||||
const { roleId1, battleCode, hasRpl } = rec;
|
||||
const rplFileUrl = battleCode && hasRpl ? getRemoteRplFilePath(roleId1, WAR_TYPE.LADDER, battleCode) : '';
|
||||
const { roleId1, battleCode, hasRpl, remoteUrl } = rec;
|
||||
const rplFileUrl = battleCode && hasRpl ? getRemoteRplFilePath(remoteUrl, roleId1, WAR_TYPE.LADDER, battleCode) : '';
|
||||
return { ...rec, rplFileUrl };
|
||||
}),
|
||||
rplPrefixUrl: getRemoteRplPrefix(pinus.app.get('env'))
|
||||
|
||||
@@ -618,8 +618,8 @@ export class PvpHandler {
|
||||
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
list: pvpRecords.map(rec => {
|
||||
const { roleId1, battleCode, hasRpl } = rec;
|
||||
const rplFileUrl = battleCode && hasRpl ? getRemoteRplFilePath(roleId1, WAR_TYPE.PVP, battleCode) : '';
|
||||
const { roleId1, battleCode, hasRpl, remoteUrl } = rec;
|
||||
const rplFileUrl = battleCode && hasRpl ? getRemoteRplFilePath(remoteUrl, roleId1, WAR_TYPE.PVP, battleCode) : '';
|
||||
return { ...rec, rplFileUrl };
|
||||
}),
|
||||
rplPrefixUrl: getRemoteRplPrefix(pinus.app.get('env'))
|
||||
|
||||
@@ -395,8 +395,8 @@ export class GVGProduceHandler {
|
||||
let list = await GVGVestigeRecModel.findRec(roleId, vestigeId);
|
||||
let result: (GVGVestigeRecUpdate & {rplFileUrl: string})[] = [];
|
||||
for(let rec of list) {
|
||||
const { attackRoleId, battleCode, hasRpl } = rec;
|
||||
const rplFileUrl = battleCode && hasRpl ? getRemoteRplFilePath(attackRoleId, WAR_TYPE.GVG_VESTIGE, battleCode) : '';
|
||||
const { attackRoleId, battleCode, hasRpl, remoteUrl } = rec;
|
||||
const rplFileUrl = battleCode && hasRpl ? getRemoteRplFilePath(remoteUrl, attackRoleId, WAR_TYPE.GVG_VESTIGE, battleCode) : '';
|
||||
const obj = getVestigeRecStatus(rec);
|
||||
if(obj.status == VESTIGE_STATUS.COMPLETE) result.push({ ...rec, endTime: obj.time, rplFileUrl });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user