feat(statistics): implement statistics module with controller and service for POS invoices
This commit is contained in:
@@ -14,4 +14,50 @@ export class PosKeyMaker {
|
||||
static goodListByGuildPattern(guildId: string): string {
|
||||
return `pos:goods:list:guildId:${guildId}:ba:*`
|
||||
}
|
||||
|
||||
static statisticInvoicesPattern(businessActivityId: string): string {
|
||||
return `pos:statistics:invoices:ba:${businessActivityId}:*`
|
||||
}
|
||||
static statisticInvoices(
|
||||
businessActivityId: string,
|
||||
posId: string,
|
||||
from: string,
|
||||
): string {
|
||||
return `pos:statistics:invoices:ba:${businessActivityId}:pos:${posId}:from:${from}:all`
|
||||
}
|
||||
static statisticInvoicesNotSent(
|
||||
businessActivityId: string,
|
||||
posId: string,
|
||||
from: string,
|
||||
): string {
|
||||
return `pos:statistics:invoices:ba:${businessActivityId}:pos:${posId}:from:${from}:not-sent`
|
||||
}
|
||||
static statisticInvoicesSuccess(
|
||||
businessActivityId: string,
|
||||
posId: string,
|
||||
from: string,
|
||||
): string {
|
||||
return `pos:statistics:invoices:ba:${businessActivityId}:pos:${posId}:from:${from}:success`
|
||||
}
|
||||
static statisticInvoicesFailure(
|
||||
businessActivityId: string,
|
||||
posId: string,
|
||||
from: string,
|
||||
): string {
|
||||
return `pos:statistics:invoices:ba:${businessActivityId}:pos:${posId}:from:${from}:failure`
|
||||
}
|
||||
static statisticInvoicesPending(
|
||||
businessActivityId: string,
|
||||
posId: string,
|
||||
from: string,
|
||||
): string {
|
||||
return `pos:statistics:invoices:ba:${businessActivityId}:pos:${posId}:from:${from}:pending`
|
||||
}
|
||||
static statisticInvoicesCredit(
|
||||
businessActivityId: string,
|
||||
posId: string,
|
||||
from: string,
|
||||
): string {
|
||||
return `pos:statistics:invoices:ba:${businessActivityId}:pos:${posId}:from:${from}:credit`
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user