wangrong
2026-07-28 880754189dd41ce2e07367f341275bef8e3f65d1
告警消息补充了body.body
1个文件已修改
34 ■■■■ 已修改文件
src/modules/push/service/open.ts 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/modules/push/service/open.ts
@@ -144,9 +144,9 @@
        case 'ys.alarm': {
          // 图片下载并上传到本地/对象存储  pictureList: Array<{ url: string; id: string }>;
          const localUrls: Record<string, string>[] = [];
          if (body.pictureList && Array.isArray(body.pictureList)) {
          if (body.body.pictureList && Array.isArray(body.body.pictureList)) {
            const filePlugin = await this.pluginService.getInstance('upload');
            for (const item of body.pictureList) {
            for (const item of body.body.pictureList) {
              try {
                const result = await filePlugin.downAndUpload(item.url);
                localUrls.push({url: result, id: item.id});
@@ -156,21 +156,21 @@
            }
          }
          await this.pushDevicealarmEntity.save({
            devSerial: body.devSerial,
            channelNo: body.channelNo || String(body.channel),
            alarmId: body.alarmId,
            alarmTime: body.alarmTime,
            alarmType: body.alarmType,
            channelName: body.channelName,
            channelType: body.channelType ? Number(body.channelType) : 1,
            checksum: body.checksum,
            crypt: body.crypt ? Number(body.crypt) : 0,
            customInfo: body.customInfo,
            customType: body.customType,
            describe: body.describe,
            location: body.location,
            relationId: body.relationId,
            status: body.status ? Number(body.status) : 1,
            devSerial: body.body.devSerial,
            channelNo: body.body.channelNo || String(body.body.channel),
            alarmId: body.body.alarmId,
            alarmTime: body.body.alarmTime,
            alarmType: body.body.alarmType,
            channelName: body.body.channelName,
            channelType: body.body.channelType ? Number(body.body.channelType) : 1,
            checksum: body.body.checksum,
            crypt: body.body.crypt ? Number(body.body.crypt) : 0,
            customInfo: body.body.customInfo,
            customType: body.body.customType,
            describe: body.body.describe,
            location: body.body.location,
            relationId: body.body.relationId,
            status: body.body.status ? Number(body.body.status) : 1,
            pictureList: localUrls || []
          });
          break;