feat(promo): promo metric event logs and HQ timeline charts (v3.4.13)
Add log_promo_event for scan/attribution/register/order with IP; admin metrics APIs and ECharts on promo detail page. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -6,6 +6,8 @@ import { PromoCodeService } from './promo-code.service';
|
||||
import {
|
||||
CreatePromoCodeDto,
|
||||
PromoCodeListQueryDto,
|
||||
PromoMetricEventsQueryDto,
|
||||
PromoMetricTimelineQueryDto,
|
||||
UpdatePromoCodeDto,
|
||||
UpdatePromoCodeStatusDto,
|
||||
} from './dto/promo-code.dto';
|
||||
@@ -39,6 +41,16 @@ export class AdminPromoCodeController {
|
||||
return this.service.stats(BigInt(id));
|
||||
}
|
||||
|
||||
@Get(':id/metrics/timeline')
|
||||
metricsTimeline(@Param('id') id: string, @Query() query: PromoMetricTimelineQueryDto) {
|
||||
return this.service.getMetricsTimeline(BigInt(id), query);
|
||||
}
|
||||
|
||||
@Get(':id/metrics/events')
|
||||
metricsEvents(@Param('id') id: string, @Query() query: PromoMetricEventsQueryDto) {
|
||||
return this.service.listMetricEvents(BigInt(id), query);
|
||||
}
|
||||
|
||||
@Get(':id/qrcode')
|
||||
qrcode(@Param('id') id: string) {
|
||||
return this.service.getQrcodeUrl(BigInt(id));
|
||||
|
||||
Reference in New Issue
Block a user