From 7c95d1d425413a9ed8d11df8a17329f77b80209f Mon Sep 17 00:00:00 2001 From: hailin Date: Thu, 26 Feb 2026 22:01:03 -0800 Subject: [PATCH] =?UTF-8?q?fix(admin-service):=20admin=20config=20?= =?UTF-8?q?=E7=AB=AF=E7=82=B9=E4=B9=9F=E8=BF=94=E5=9B=9E=20agreementText?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit planting-service 调用的是 admin 控制器的 getConfig()(非 public 控制器), 因为 public 控制器有双重 api/v1 前缀。确保 admin getConfig 也包含协议文本。 Co-Authored-By: Claude Opus 4.6 --- .../src/pre-planting/pre-planting-config.controller.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/services/admin-service/src/pre-planting/pre-planting-config.controller.ts b/backend/services/admin-service/src/pre-planting/pre-planting-config.controller.ts index 2998050e..82a89026 100644 --- a/backend/services/admin-service/src/pre-planting/pre-planting-config.controller.ts +++ b/backend/services/admin-service/src/pre-planting/pre-planting-config.controller.ts @@ -41,10 +41,12 @@ export class PrePlantingConfigController { ) {} @Get('config') - @ApiOperation({ summary: '获取预种计划开关状态' }) + @ApiOperation({ summary: '获取预种计划开关状态(含协议文本)' }) @ApiResponse({ status: HttpStatus.OK, description: '开关状态' }) async getConfig() { - return this.configService.getConfig(); + const config = await this.configService.getConfig(); + const agreementText = await this.configService.getAgreement(); + return { ...config, agreementText }; } @Post('config')