From cd9fa9707b1c2c8228b1d34a7b0849d867b3d9b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allen=20Zhang=20=28=E5=BC=A0=E6=B6=9B=29?= Date: Tue, 9 Apr 2024 15:11:22 +0800 Subject: [PATCH] upd --- .../canyon-backend/src/coverage/coverage.controller.ts | 7 ++++++- .../src/coverage/services/coverage-client.service.ts | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/canyon-backend/src/coverage/coverage.controller.ts b/packages/canyon-backend/src/coverage/coverage.controller.ts index 6b89357a..5852042e 100755 --- a/packages/canyon-backend/src/coverage/coverage.controller.ts +++ b/packages/canyon-backend/src/coverage/coverage.controller.ts @@ -47,9 +47,14 @@ export class CoverageController { @Body() coverageClientDto: CoverageClientDto, @Request() req: any, ): Promise { + // console.log(req.ip); // 添加特殊上报逻辑处 (这是标记,勿动!) // {{$mpaasSpecial}}添加特殊上报逻辑处 (这是标记,勿动!) - return this.coverageClientService.invoke(req.user.id, coverageClientDto); + return this.coverageClientService.invoke( + req.user.id, + coverageClientDto, + req.ip, + ); } @Get('api/coverage/summary/map') diff --git a/packages/canyon-backend/src/coverage/services/coverage-client.service.ts b/packages/canyon-backend/src/coverage/services/coverage-client.service.ts index 8ce134a0..1042de4f 100755 --- a/packages/canyon-backend/src/coverage/services/coverage-client.service.ts +++ b/packages/canyon-backend/src/coverage/services/coverage-client.service.ts @@ -36,7 +36,7 @@ export class CoverageClientService { private coverageLogModel: Model, ) {} - async invoke(currentUser, coverageClientDto: CoverageClientDto) { + async invoke(currentUser, coverageClientDto: CoverageClientDto, ip) { if (coverageClientDto.projectID === '98620') { return {}; } @@ -113,6 +113,7 @@ export class CoverageClientService { coverage: { ...cov, coverage: 1, + ip, }, }); pushQueue(cov);