feat: integrate analytics and fragment receipt improvements

This commit is contained in:
hectorzhao
2026-08-03 15:34:41 +08:00
parent 3357ace7e1
commit 530a65de80
89 changed files with 1964 additions and 324 deletions
@@ -1,9 +1,12 @@
import { Body, Controller, Delete, Get, Param, Post, Query } from '@nestjs/common';
import { Body, Controller, Delete, Get, Param, Post, Put, Query } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { CurrentSessionUserId } from '../auth/current-session-user.decorator';
import {
CreateCommonReportFieldDto,
CreateBlacklistDto,
CreateDrainageFieldDto,
UpsertDrainageDetectionRuleDto,
TestDrainageDetectionDto,
CreatePhoneCarrierRuleDto,
CreatePhoneSegmentDto,
CreateSensitiveWordDto,
@@ -125,6 +128,31 @@ export class DictionariesController {
return this.dictionaries.deleteDrainageField(id);
}
@Get('drainage-detection-rules')
listDrainageDetectionRules(@Query('keyword') keyword?: string, @Query('status') status?: string) {
return this.dictionaries.listDrainageDetectionRules({ keyword, status });
}
@Post('drainage-detection-rules/test')
testDrainageDetection(@Body() body: TestDrainageDetectionDto) {
return this.dictionaries.testDrainageDetection(body);
}
@Post('drainage-detection-rules')
createDrainageDetectionRule(@Body() body: UpsertDrainageDetectionRuleDto, @CurrentSessionUserId() operatorId?: string) {
return this.dictionaries.createDrainageDetectionRule({ ...body, operatorId });
}
@Put('drainage-detection-rules/:id')
updateDrainageDetectionRule(@Param('id') id: string, @Body() body: UpsertDrainageDetectionRuleDto, @CurrentSessionUserId() operatorId?: string) {
return this.dictionaries.updateDrainageDetectionRule(id, { ...body, operatorId });
}
@Post('drainage-detection-rules/:id/status')
changeDrainageDetectionRuleStatus(@Param('id') id: string, @Body() body: DictionaryStatusDto, @CurrentSessionUserId() operatorId?: string) {
return this.dictionaries.changeDrainageDetectionRuleStatus(id, { ...body, operatorId });
}
@Get('common-report-fields')
listCommonReportFields() {
return this.dictionaries.listCommonReportFields();