perf: 站点证书监控通知发送,每天定时检查

This commit is contained in:
xiaojunnuo
2024-12-23 18:11:06 +08:00
parent 89c7f07034
commit bb4910f4e5
16 changed files with 536 additions and 143 deletions
@@ -1,5 +1,5 @@
import { Inject, Provide, Scope, ScopeEnum } from '@midwayjs/core';
import { BaseService, SysSettingsService, SysSiteInfo, ValidateException } from '@certd/lib-server';
import { BaseService, SysInstallInfo, SysSettingsService, SysSiteInfo, ValidateException } from '@certd/lib-server';
import { InjectEntityModel } from '@midwayjs/typeorm';
import { Repository } from 'typeorm';
import { NotificationEntity } from '../entity/notification.js';
@@ -187,4 +187,10 @@ export class NotificationService extends BaseService<NotificationEntity> {
}
}
}
async getBindUrl(path: string) {
const installInfo = await this.sysSettingsService.getSetting<SysInstallInfo>(SysInstallInfo);
const bindUrl = installInfo.bindUrl || 'http://127.0.0.1:7001';
return bindUrl + path;
}
}