chore: 首页数据统计项目显示

This commit is contained in:
xiaojunnuo
2026-02-27 00:14:53 +08:00
parent 787f6ef528
commit b2c421600c
8 changed files with 72 additions and 22 deletions
@@ -191,11 +191,12 @@ export class CertInfoService extends BaseService<CertInfoEntity> {
});
}
async count({ userId }: { userId: number }) {
async count({ userId,projectId }: { userId: number,projectId?:number }) {
const total = await this.repository.count({
where: {
userId,
expiresTime: Not(IsNull()),
projectId,
},
});
@@ -203,6 +204,7 @@ export class CertInfoService extends BaseService<CertInfoEntity> {
where: {
userId,
expiresTime: LessThan(new Date().getTime()),
projectId,
},
});
@@ -210,6 +212,7 @@ export class CertInfoService extends BaseService<CertInfoEntity> {
where: {
userId,
expiresTime: Between(new Date().getTime(), new Date().getTime() + 15 * 24 * 60 * 60 * 1000),
projectId,
},
});