mirror of
https://github.com/certd/certd.git
synced 2026-05-18 06:17:31 +08:00
perf: 修复删除历史记录没有删除log的bug,新增history管理页面,演示站点启动时不自动启动非管理员用户的定时任务
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Provide, Scope, ScopeEnum } from '@midwayjs/core';
|
||||
import { InjectEntityModel } from '@midwayjs/typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
import { In, Repository } from 'typeorm';
|
||||
import { BaseService } from '../../../basic/base-service.js';
|
||||
import { HistoryLogEntity } from '../entity/history-log.js';
|
||||
|
||||
@@ -24,4 +24,11 @@ export class HistoryLogService extends BaseService<HistoryLogEntity> {
|
||||
await this.add(bean);
|
||||
}
|
||||
}
|
||||
|
||||
async deleteByHistoryIds(numbers: number[]) {
|
||||
if (numbers.length === 0) {
|
||||
return;
|
||||
}
|
||||
await this.repository.delete({ historyId: In(numbers) });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user