From 66fb9e5f49491f9c159363b48af14720a37673b1 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Wed, 25 Dec 2024 11:42:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A5=97=E9=A4=90?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E7=8A=B6=E6=80=81=E4=B8=8B=EF=BC=8C=E4=BB=8D?= =?UTF-8?q?=E7=84=B6=E9=99=90=E5=88=B6=E7=94=A8=E6=88=B7=E6=B5=81=E6=B0=B4?= =?UTF-8?q?=E7=BA=BF=E6=95=B0=E9=87=8F=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/run/docker-compose.yaml | 2 +- .../modules/pipeline/service/pipeline-service.ts | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/docker/run/docker-compose.yaml b/docker/run/docker-compose.yaml index f9597541..0f1c0dec 100644 --- a/docker/run/docker-compose.yaml +++ b/docker/run/docker-compose.yaml @@ -25,7 +25,7 @@ services: # - 8.8.4.4 # extra_hosts: # # ↓↓↓↓ -------------------------------------------------------- 这里可以配置自定义hosts,外网域名可以指向本地局域网ip地址 -# - "localdomain.comm:192.168.1.3" +# - "localdomain.com:192.168.1.3" environment: # 设置环境变量即可自定义certd配置 diff --git a/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts b/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts index dac7f98e..3bf8deef 100644 --- a/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts +++ b/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts @@ -204,13 +204,16 @@ export class PipelineService extends BaseService { // } if (isComm()) { //校验pipelineCount - const userSuite = await this.userSuiteService.getMySuiteDetail(bean.userId); - if (userSuite?.pipelineCount.max != -1 && userSuite?.pipelineCount.used + 1 > userSuite?.pipelineCount.max) { - throw new NeedSuiteException(`对不起,您最多只能创建${userSuite?.pipelineCount.max}条流水线,请购买或升级套餐`); - } + const suiteSetting = await this.userSuiteService.getSuiteSetting(); + if (suiteSetting.enabled) { + const userSuite = await this.userSuiteService.getMySuiteDetail(bean.userId); + if (userSuite?.pipelineCount.max != -1 && userSuite?.pipelineCount.used + 1 > userSuite?.pipelineCount.max) { + throw new NeedSuiteException(`对不起,您最多只能创建${userSuite?.pipelineCount.max}条流水线,请购买或升级套餐`); + } - if (userSuite.domainCount.max != -1 && userSuite.domainCount.used + domains.length > userSuite.domainCount.max) { - throw new NeedSuiteException(`对不起,您最多只能添加${userSuite.domainCount.max}个域名,请购买或升级套餐`); + if (userSuite.domainCount.max != -1 && userSuite.domainCount.used + domains.length > userSuite.domainCount.max) { + throw new NeedSuiteException(`对不起,您最多只能添加${userSuite.domainCount.max}个域名,请购买或升级套餐`); + } } }