perf: 支持企业微信群聊机器人通知

This commit is contained in:
xiaojunnuo
2024-11-23 23:58:31 +08:00
parent 5450246f06
commit b805a29259
19 changed files with 163 additions and 41 deletions
@@ -0,0 +1,19 @@
import { IUrlService } from '@certd/pipeline';
import { Inject, Provide, Scope, ScopeEnum } from '@midwayjs/core';
import { SysInstallInfo, SysSettingsService } from '@certd/lib-server';
@Provide()
@Scope(ScopeEnum.Singleton)
export class UrlService implements IUrlService {
@Inject()
sysSettingsService: SysSettingsService;
async getPipelineDetailUrl(pipelineId: number, historyId: number): Promise<string> {
const installInfo = await this.sysSettingsService.getSetting<SysInstallInfo>(SysInstallInfo);
let baseUrl = 'http://127.0.0.1:7001';
if (installInfo.bindUrl) {
baseUrl = installInfo.bindUrl;
}
return `${baseUrl}#/certd/pipeline/detail?id=${pipelineId}&historyId=${historyId}`;
}
}