From 0069c0e3992946a8dd6410f299d4fc974ef0e76b Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Mon, 17 Mar 2025 00:16:56 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E7=AB=99=E7=82=B9=E8=AF=81=E4=B9=A6?= =?UTF-8?q?=E7=9B=91=E6=8E=A7=E6=94=AF=E6=8C=81=E6=A8=A1=E7=B3=8A=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/certd/pipeline/certd-form/crud.tsx | 3 +-- .../user/monitor/site-info-controller.ts | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx b/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx index c22d41d6..10e10aec 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx @@ -76,8 +76,7 @@ export default function (certPlugins: any[], formWrapperRef: any): CreateCrudOpt dict: dict({ data: [ { value: "CertApply", label: "JS-ACME" }, - { value: "CertApplyLego", label: "Lego-ACME" }, - { value: "CertUpload", label: "上传自定义证书" } + { value: "CertApplyLego", label: "Lego-ACME" } ] }), form: { diff --git a/packages/ui/certd-server/src/controller/user/monitor/site-info-controller.ts b/packages/ui/certd-server/src/controller/user/monitor/site-info-controller.ts index 16ad1922..51d803b2 100644 --- a/packages/ui/certd-server/src/controller/user/monitor/site-info-controller.ts +++ b/packages/ui/certd-server/src/controller/user/monitor/site-info-controller.ts @@ -21,10 +21,27 @@ export class SiteInfoController extends CrudController { async page(@Body(ALL) body: any) { body.query = body.query ?? {}; body.query.userId = this.getUserId(); + const certDomains = body.query.certDomains; + const domain = body.query.domain; + const name = body.query.name; + delete body.query.certDomains; + delete body.query.domain; + delete body.query.name; const res = await this.service.page({ query: body.query, page: body.page, sort: body.sort, + buildQuery: (bq) => { + if (domain) { + bq.andWhere('domain like :domain', { domain: `%${domain}%` }); + } + if (certDomains) { + bq.andWhere('cert_domains like :cert_domains', { cert_domains: `%${certDomains}%` }); + } + if (name) { + bq.andWhere('name like :name', { name: `%${name}%` }); + } + } }); return this.ok(res); }