feat(settlement): redesign factory/partner/store statement bills
CI / verify (pull_request) Has been cancelled
CI / verify (pull_request) Has been cancelled
Add WineryBill/StoreBill tables, partner review-send-confirm flow, daily/monthly cron, and admin multi-select confirm with status filters. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
"@nestjs/core": "^10.4.0",
|
||||
"@nestjs/jwt": "^10.2.0",
|
||||
"@nestjs/platform-express": "^10.4.0",
|
||||
"@nestjs/schedule": "^6.1.3",
|
||||
"@prisma/client": "^5.18.0",
|
||||
"ali-oss": "^6.23.0",
|
||||
"bullmq": "^5.12.0",
|
||||
|
||||
@@ -199,12 +199,19 @@ enum HqAdminRole {
|
||||
}
|
||||
|
||||
enum PartnerBillStatus {
|
||||
DRAFT
|
||||
CONFIRMED
|
||||
PENDING_REVIEW
|
||||
AWAITING_CONFIRM
|
||||
UNPAID
|
||||
PAID
|
||||
REJECTED
|
||||
}
|
||||
|
||||
// 酒厂/门店对账单打款状态
|
||||
enum FinancePayStatus {
|
||||
UNPAID
|
||||
PAID
|
||||
}
|
||||
|
||||
enum StoreStatus {
|
||||
OPEN
|
||||
PAUSED
|
||||
@@ -646,8 +653,9 @@ model PartnerBill {
|
||||
orderCommission Decimal @default(0) @map("order_commission") @db.Decimal(10, 2)
|
||||
redeemCommission Decimal @default(0) @map("redeem_commission") @db.Decimal(10, 2)
|
||||
totalAmount Decimal @map("total_amount") @db.Decimal(10, 2)
|
||||
status PartnerBillStatus @default(DRAFT)
|
||||
status PartnerBillStatus @default(PENDING_REVIEW)
|
||||
confirmedAt DateTime? @map("confirmed_at") @db.DateTime(3)
|
||||
sentAt DateTime? @map("sent_at") @db.DateTime(3)
|
||||
paidAt DateTime? @map("paid_at") @db.DateTime(3)
|
||||
rejectReason String? @map("reject_reason") @db.VarChar(500)
|
||||
createdAt DateTime @default(now()) @map("created_at") @db.DateTime(3)
|
||||
@@ -655,6 +663,7 @@ model PartnerBill {
|
||||
partnerAccount PartnerAccount @relation(fields: [partnerAccountId], references: [id], onDelete: Restrict)
|
||||
|
||||
@@index([partnerAccountId, status])
|
||||
@@unique([partnerAccountId, periodStart])
|
||||
@@map("partner_bill")
|
||||
}
|
||||
|
||||
@@ -830,6 +839,7 @@ model Store {
|
||||
redeemPendingRecords RedeemPendingRecord[]
|
||||
ratings StoreRating[]
|
||||
payouts StorePayout[]
|
||||
storeBills StoreBill[]
|
||||
|
||||
@@index([cityId, status])
|
||||
@@index([partnerAccountId])
|
||||
@@ -1104,10 +1114,32 @@ model StoreRating {
|
||||
@@map("user_store_rating")
|
||||
}
|
||||
|
||||
model StoreBill {
|
||||
id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
|
||||
billNo String @unique @map("bill_no") @db.VarChar(32)
|
||||
storeId BigInt @map("store_id") @db.UnsignedBigInt
|
||||
billDate DateTime @map("bill_date") @db.DateTime(3)
|
||||
redeemCount Int @default(0) @map("redeem_count")
|
||||
redeemAmount Decimal @map("redeem_amount") @db.Decimal(10, 2)
|
||||
settlementRate Decimal @map("settlement_rate") @db.Decimal(5, 4)
|
||||
payoutAmount Decimal @map("payout_amount") @db.Decimal(10, 2)
|
||||
status FinancePayStatus @default(UNPAID)
|
||||
paidAt DateTime? @map("paid_at") @db.DateTime(3)
|
||||
createdAt DateTime @default(now()) @map("created_at") @db.DateTime(3)
|
||||
|
||||
store Store @relation(fields: [storeId], references: [id], onDelete: Restrict)
|
||||
payouts StorePayout[]
|
||||
|
||||
@@unique([storeId, billDate])
|
||||
@@index([status, billDate])
|
||||
@@map("store_bill")
|
||||
}
|
||||
|
||||
model StorePayout {
|
||||
id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
|
||||
redeemRecordId BigInt @unique @map("redeem_record_id") @db.UnsignedBigInt
|
||||
storeId BigInt @map("store_id") @db.UnsignedBigInt
|
||||
storeBillId BigInt? @map("store_bill_id") @db.UnsignedBigInt
|
||||
redeemAmount Decimal @map("redeem_amount") @db.Decimal(10, 2)
|
||||
payoutAmount Decimal @map("payout_amount") @db.Decimal(10, 2)
|
||||
settlementRate Decimal @map("settlement_rate") @db.Decimal(5, 4)
|
||||
@@ -1119,11 +1151,49 @@ model StorePayout {
|
||||
|
||||
redeemRecord RedeemRecord @relation(fields: [redeemRecordId], references: [id], onDelete: Restrict)
|
||||
store Store @relation(fields: [storeId], references: [id], onDelete: Restrict)
|
||||
storeBill StoreBill? @relation(fields: [storeBillId], references: [id], onDelete: SetNull)
|
||||
|
||||
@@index([storeId, status])
|
||||
@@index([storeBillId])
|
||||
@@map("store_payout")
|
||||
}
|
||||
|
||||
model WineryBill {
|
||||
id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
|
||||
billNo String @unique @map("bill_no") @db.VarChar(32)
|
||||
billDate DateTime @map("bill_date") @db.DateTime(3)
|
||||
orderCount Int @default(0) @map("order_count")
|
||||
orderAmount Decimal @map("order_amount") @db.Decimal(10, 2)
|
||||
wineryRate Decimal @map("winery_rate") @db.Decimal(5, 4)
|
||||
wineryAmount Decimal @map("winery_amount") @db.Decimal(10, 2)
|
||||
status FinancePayStatus @default(UNPAID)
|
||||
paidAt DateTime? @map("paid_at") @db.DateTime(3)
|
||||
createdAt DateTime @default(now()) @map("created_at") @db.DateTime(3)
|
||||
|
||||
items WineryBillItem[]
|
||||
|
||||
@@unique([billDate])
|
||||
@@index([status, billDate])
|
||||
@@map("winery_bill")
|
||||
}
|
||||
|
||||
model WineryBillItem {
|
||||
id BigInt @id @default(autoincrement()) @db.UnsignedBigInt
|
||||
wineryBillId BigInt @map("winery_bill_id") @db.UnsignedBigInt
|
||||
orderId BigInt @unique @map("order_id") @db.UnsignedBigInt
|
||||
orderNo String @map("order_no") @db.VarChar(32)
|
||||
deliveryType String @map("delivery_type") @db.VarChar(16)
|
||||
payAmount Decimal @map("pay_amount") @db.Decimal(10, 2)
|
||||
wineryAmount Decimal @map("winery_amount") @db.Decimal(10, 2)
|
||||
paidAt DateTime @map("paid_at") @db.DateTime(3)
|
||||
createdAt DateTime @default(now()) @map("created_at") @db.DateTime(3)
|
||||
|
||||
wineryBill WineryBill @relation(fields: [wineryBillId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([wineryBillId])
|
||||
@@map("winery_bill_item")
|
||||
}
|
||||
|
||||
// ─── LOG ──────────────────────────────────────────────
|
||||
|
||||
model LogThirdParty {
|
||||
|
||||
@@ -218,7 +218,7 @@ async function main() {
|
||||
orderCommission: 1200,
|
||||
redeemCommission: 800,
|
||||
totalAmount: 2000,
|
||||
status: 'CONFIRMED',
|
||||
status: 'UNPAID',
|
||||
confirmedAt: now,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -896,7 +896,7 @@ async function main() {
|
||||
|
||||
totalAmount: 2000,
|
||||
|
||||
status: 'CONFIRMED',
|
||||
status: 'UNPAID',
|
||||
|
||||
confirmedAt: now,
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
-- Optional one-time data remap before/after prisma db push when upgrading PartnerBillStatus.
|
||||
-- Run against MySQL if legacy DRAFT/CONFIRMED rows exist.
|
||||
|
||||
-- Step A (before removing old enum values): widen enum if needed via Prisma push,
|
||||
-- then remap:
|
||||
UPDATE partner_bill SET status = 'PENDING_REVIEW' WHERE status = 'DRAFT';
|
||||
UPDATE partner_bill SET status = 'UNPAID' WHERE status = 'CONFIRMED';
|
||||
@@ -47,10 +47,17 @@ export const HqOperationAction = {
|
||||
TICKET_REJECT: 'TICKET_REJECT',
|
||||
STORE_PAYOUT_CONFIRM: 'STORE_PAYOUT_CONFIRM',
|
||||
STORE_PAYOUT_BATCH_CONFIRM: 'STORE_PAYOUT_BATCH_CONFIRM',
|
||||
STORE_BILL_CONFIRM: 'STORE_BILL_CONFIRM',
|
||||
STORE_BILL_BATCH_CONFIRM: 'STORE_BILL_BATCH_CONFIRM',
|
||||
PARTNER_BILL_GENERATE: 'PARTNER_BILL_GENERATE',
|
||||
PARTNER_BILL_SEND: 'PARTNER_BILL_SEND',
|
||||
PARTNER_BILL_BATCH_SEND: 'PARTNER_BILL_BATCH_SEND',
|
||||
PARTNER_BILL_CONFIRM: 'PARTNER_BILL_CONFIRM',
|
||||
PARTNER_BILL_MARK_PAID: 'PARTNER_BILL_MARK_PAID',
|
||||
PARTNER_BILL_BATCH_MARK_PAID: 'PARTNER_BILL_BATCH_MARK_PAID',
|
||||
PARTNER_BILL_REJECT: 'PARTNER_BILL_REJECT',
|
||||
WINERY_BILL_CONFIRM: 'WINERY_BILL_CONFIRM',
|
||||
WINERY_BILL_BATCH_CONFIRM: 'WINERY_BILL_BATCH_CONFIRM',
|
||||
REDEEM_DEBUG_CREATE_TOKEN: 'REDEEM_DEBUG_CREATE_TOKEN',
|
||||
REDEEM_DEBUG_CONFIRM: 'REDEEM_DEBUG_CONFIRM',
|
||||
PROMO_CODE_CREATE: 'PROMO_CODE_CREATE',
|
||||
@@ -114,10 +121,17 @@ export const HQ_OPERATION_ACTION_LABELS: Record<string, string> = {
|
||||
[HqOperationAction.TICKET_REJECT]: '工单驳回',
|
||||
[HqOperationAction.STORE_PAYOUT_CONFIRM]: '门店打款确认',
|
||||
[HqOperationAction.STORE_PAYOUT_BATCH_CONFIRM]: '批量门店打款',
|
||||
[HqOperationAction.STORE_BILL_CONFIRM]: '门店对账单确认打款',
|
||||
[HqOperationAction.STORE_BILL_BATCH_CONFIRM]: '批量门店对账单打款',
|
||||
[HqOperationAction.PARTNER_BILL_GENERATE]: '生成合伙人账单',
|
||||
[HqOperationAction.PARTNER_BILL_SEND]: '发送合伙人账单',
|
||||
[HqOperationAction.PARTNER_BILL_BATCH_SEND]: '批量发送合伙人账单',
|
||||
[HqOperationAction.PARTNER_BILL_CONFIRM]: '确认合伙人账单',
|
||||
[HqOperationAction.PARTNER_BILL_MARK_PAID]: '合伙人账单结算',
|
||||
[HqOperationAction.PARTNER_BILL_BATCH_MARK_PAID]: '批量合伙人账单结算',
|
||||
[HqOperationAction.PARTNER_BILL_REJECT]: '驳回合伙人打款申请',
|
||||
[HqOperationAction.WINERY_BILL_CONFIRM]: '酒厂对账单确认打款',
|
||||
[HqOperationAction.WINERY_BILL_BATCH_CONFIRM]: '批量酒厂对账单打款',
|
||||
[HqOperationAction.REDEEM_DEBUG_CREATE_TOKEN]: '核销调试-生成码',
|
||||
[HqOperationAction.REDEEM_DEBUG_CONFIRM]: '核销调试-确认核销',
|
||||
[HqOperationAction.PROMO_CODE_CREATE]: '创建推广码',
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { ScheduleModule } from '@nestjs/schedule';
|
||||
import { BullModule } from '@nestjs/bullmq';
|
||||
import { TradeModule } from '../modules/trade/trade.module';
|
||||
import { SettlementModule } from '../modules/settlement/settlement.module';
|
||||
import { DeliveryProcessor } from './delivery.processor';
|
||||
import { SettlementScheduler } from './settlement.scheduler';
|
||||
import { DELIVERY_QUEUE } from './jobs.constants';
|
||||
|
||||
@Module({
|
||||
imports: [BullModule.registerQueue({ name: DELIVERY_QUEUE }), TradeModule],
|
||||
providers: [DeliveryProcessor],
|
||||
imports: [
|
||||
ScheduleModule.forRoot(),
|
||||
BullModule.registerQueue({ name: DELIVERY_QUEUE }),
|
||||
TradeModule,
|
||||
SettlementModule,
|
||||
],
|
||||
providers: [DeliveryProcessor, SettlementScheduler],
|
||||
})
|
||||
export class JobsModule {}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { Cron } from '@nestjs/schedule';
|
||||
import { SettlementService } from '../modules/settlement/settlement.service';
|
||||
|
||||
/**
|
||||
* 财务对账单定时任务(Asia/Shanghai)
|
||||
* - 每日 08:00:酒厂日账单 + 门店日账单(统计昨日 00:00~今日 00:00)
|
||||
* - 每月 1 日 08:00:合伙人上一自然月账单
|
||||
*/
|
||||
@Injectable()
|
||||
export class SettlementScheduler {
|
||||
private readonly logger = new Logger(SettlementScheduler.name);
|
||||
|
||||
constructor(private readonly settlementService: SettlementService) {}
|
||||
|
||||
@Cron('0 8 * * *', { timeZone: 'Asia/Shanghai' })
|
||||
async handleDailyBills() {
|
||||
this.logger.log('Daily settlement bills job start');
|
||||
try {
|
||||
const winery = await this.settlementService.generateWineryBillForDay();
|
||||
this.logger.log(`Winery bill: ${JSON.stringify(winery)}`);
|
||||
} catch (e) {
|
||||
this.logger.error('Winery bill job failed', e instanceof Error ? e.stack : e);
|
||||
}
|
||||
try {
|
||||
const store = await this.settlementService.generateStoreBillsForDay();
|
||||
this.logger.log(`Store bills: ${JSON.stringify(store)}`);
|
||||
} catch (e) {
|
||||
this.logger.error('Store bill job failed', e instanceof Error ? e.stack : e);
|
||||
}
|
||||
}
|
||||
|
||||
@Cron('0 8 1 * *', { timeZone: 'Asia/Shanghai' })
|
||||
async handleMonthlyPartnerBills() {
|
||||
this.logger.log('Monthly partner bills job start');
|
||||
try {
|
||||
const result = await this.settlementService.generatePreviousMonthPartnerBills();
|
||||
this.logger.log(
|
||||
`Partner bills: total=${result.total} success=${result.success} failed=${result.failed}`,
|
||||
);
|
||||
} catch (e) {
|
||||
this.logger.error('Partner bill job failed', e instanceof Error ? e.stack : e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,8 +43,8 @@ export class AdminDashboardService {
|
||||
this.prisma.redeemRecord.count({ where: { createdAt: { gte: todayStart } } }),
|
||||
this.prisma.orderDelivery.count(),
|
||||
this.prisma.storePayout.count({ where: { status: 'PENDING' } }),
|
||||
this.prisma.partnerBill.count({ where: { status: 'CONFIRMED' } }),
|
||||
this.prisma.partnerBill.count({ where: { status: 'DRAFT' } }),
|
||||
this.prisma.partnerBill.count({ where: { status: 'UNPAID' } }),
|
||||
this.prisma.partnerBill.count({ where: { status: 'PENDING_REVIEW' } }),
|
||||
this.prisma.commonTicket.count({ where: { status: { in: ['PENDING', 'OPEN'] } } }),
|
||||
]);
|
||||
|
||||
|
||||
@@ -28,6 +28,11 @@ export class SettlementController {
|
||||
return this.settlementService.listPartnerBills(user.actorId);
|
||||
}
|
||||
|
||||
@Post('bills/batch-confirm')
|
||||
batchConfirm(@CurrentUser() user: AuthUser, @Body() body: { ids: string[] }) {
|
||||
return this.settlementService.batchPartnerConfirmBills(user.actorId, body.ids ?? []);
|
||||
}
|
||||
|
||||
@Post('bills/:id/confirm')
|
||||
confirm(@CurrentUser() user: AuthUser, @Param('id') id: string) {
|
||||
return this.settlementService.partnerConfirmBill(user.actorId, BigInt(id));
|
||||
@@ -126,6 +131,65 @@ export class AdminStorePayoutController {
|
||||
}
|
||||
}
|
||||
|
||||
@Controller('admin/store-bills')
|
||||
@UseGuards(HqAuthGuard)
|
||||
export class AdminStoreBillController {
|
||||
constructor(private readonly settlementService: SettlementService) {}
|
||||
|
||||
@Get()
|
||||
list(@Query() query: Record<string, string>) {
|
||||
return this.settlementService.listAdminStoreBills({
|
||||
page: query.page ? Number(query.page) : 1,
|
||||
pageSize: query.pageSize ? Number(query.pageSize) : 20,
|
||||
status: query.status,
|
||||
storeId: query.storeId,
|
||||
dateFrom: query.dateFrom,
|
||||
dateTo: query.dateTo,
|
||||
});
|
||||
}
|
||||
|
||||
@Get('export')
|
||||
export(@Query() query: Record<string, string>) {
|
||||
return this.settlementService.exportAdminStoreBills({
|
||||
status: query.status,
|
||||
storeId: query.storeId,
|
||||
dateFrom: query.dateFrom,
|
||||
dateTo: query.dateTo,
|
||||
});
|
||||
}
|
||||
|
||||
@Post('generate')
|
||||
generate() {
|
||||
return this.settlementService.generateStoreBillsForDay();
|
||||
}
|
||||
|
||||
@Post('batch-confirm')
|
||||
@HqOperation({
|
||||
action: HqOperationAction.STORE_BILL_BATCH_CONFIRM,
|
||||
refType: 'STORE_BILL',
|
||||
batch: true,
|
||||
includeBody: true,
|
||||
})
|
||||
batchConfirm(@Body() body: { ids: string[] }) {
|
||||
return this.settlementService.batchConfirmStoreBills(body.ids ?? []);
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
detail(@Param('id') id: string) {
|
||||
return this.settlementService.getAdminStoreBill(BigInt(id));
|
||||
}
|
||||
|
||||
@Post(':id/confirm')
|
||||
@HqOperation({
|
||||
action: HqOperationAction.STORE_BILL_CONFIRM,
|
||||
refType: 'STORE_BILL',
|
||||
refIdParam: 'id',
|
||||
})
|
||||
confirm(@Param('id') id: string) {
|
||||
return this.settlementService.confirmStoreBill(BigInt(id));
|
||||
}
|
||||
}
|
||||
|
||||
@Controller('admin/partner-bills')
|
||||
@UseGuards(HqAuthGuard)
|
||||
export class AdminPartnerBillController {
|
||||
@@ -175,11 +239,43 @@ export class AdminPartnerBillController {
|
||||
});
|
||||
}
|
||||
|
||||
@Post('batch-send')
|
||||
@HqOperation({
|
||||
action: HqOperationAction.PARTNER_BILL_BATCH_SEND,
|
||||
refType: 'PARTNER_BILL',
|
||||
batch: true,
|
||||
includeBody: true,
|
||||
})
|
||||
batchSend(@Body() body: { ids: string[] }) {
|
||||
return this.settlementService.batchSendPartnerBills(body.ids ?? []);
|
||||
}
|
||||
|
||||
@Post('batch-mark-paid')
|
||||
@HqOperation({
|
||||
action: HqOperationAction.PARTNER_BILL_BATCH_MARK_PAID,
|
||||
refType: 'PARTNER_BILL',
|
||||
batch: true,
|
||||
includeBody: true,
|
||||
})
|
||||
batchMarkPaid(@Body() body: { ids: string[] }) {
|
||||
return this.settlementService.batchMarkPartnerBillsPaid(body.ids ?? []);
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
detail(@Param('id') id: string) {
|
||||
return this.settlementService.getAdminPartnerBill(BigInt(id));
|
||||
}
|
||||
|
||||
@Post(':id/send')
|
||||
@HqOperation({
|
||||
action: HqOperationAction.PARTNER_BILL_SEND,
|
||||
refType: 'PARTNER_BILL',
|
||||
refIdParam: 'id',
|
||||
})
|
||||
send(@Param('id') id: string) {
|
||||
return this.settlementService.sendPartnerBill(BigInt(id));
|
||||
}
|
||||
|
||||
@Post(':id/confirm')
|
||||
@HqOperation({
|
||||
action: HqOperationAction.PARTNER_BILL_CONFIRM,
|
||||
@@ -226,20 +322,55 @@ export class AdminWineryBillController {
|
||||
return this.settlementService.listAdminWineryBills({
|
||||
page: query.page ? Number(query.page) : 1,
|
||||
pageSize: query.pageSize ? Number(query.pageSize) : 20,
|
||||
status: query.status,
|
||||
dateFrom: query.dateFrom,
|
||||
dateTo: query.dateTo,
|
||||
year: query.year ? Number(query.year) : undefined,
|
||||
month: query.month ? Number(query.month) : undefined,
|
||||
deliveryType: query.deliveryType,
|
||||
});
|
||||
}
|
||||
|
||||
@Get('export')
|
||||
export(@Query() query: Record<string, string>) {
|
||||
return this.settlementService.exportAdminWineryBills({
|
||||
status: query.status,
|
||||
dateFrom: query.dateFrom,
|
||||
dateTo: query.dateTo,
|
||||
year: query.year ? Number(query.year) : undefined,
|
||||
month: query.month ? Number(query.month) : undefined,
|
||||
deliveryType: query.deliveryType,
|
||||
});
|
||||
}
|
||||
|
||||
@Post('generate')
|
||||
generate() {
|
||||
return this.settlementService.generateWineryBillForDay();
|
||||
}
|
||||
|
||||
@Post('batch-confirm')
|
||||
@HqOperation({
|
||||
action: HqOperationAction.WINERY_BILL_BATCH_CONFIRM,
|
||||
refType: 'WINERY_BILL',
|
||||
batch: true,
|
||||
includeBody: true,
|
||||
})
|
||||
batchConfirm(@Body() body: { ids: string[] }) {
|
||||
return this.settlementService.batchConfirmWineryBills(body.ids ?? []);
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
detail(@Param('id') id: string) {
|
||||
return this.settlementService.getAdminWineryBill(BigInt(id));
|
||||
}
|
||||
|
||||
@Post(':id/confirm')
|
||||
@HqOperation({
|
||||
action: HqOperationAction.WINERY_BILL_CONFIRM,
|
||||
refType: 'WINERY_BILL',
|
||||
refIdParam: 'id',
|
||||
})
|
||||
confirm(@Param('id') id: string) {
|
||||
return this.settlementService.confirmWineryBill(BigInt(id));
|
||||
}
|
||||
}
|
||||
|
||||
@Controller('partner/me')
|
||||
@@ -280,7 +411,6 @@ export class PartnerMeController {
|
||||
});
|
||||
}
|
||||
|
||||
// 门店类子账号若未配置权限,补齐开店/门店管理,便于开闭店与重传资料
|
||||
if (account.isPrimary !== 1) {
|
||||
const perms = Array.isArray(account.permissions) ? (account.permissions as string[]) : [];
|
||||
const hasStorePerm = perms.includes('store:create') || perms.includes('store:manage');
|
||||
|
||||
@@ -5,6 +5,7 @@ import { CityScopeModule } from '../city-scope/city-scope.module';
|
||||
import { SettlementService } from './settlement.service';
|
||||
import {
|
||||
AdminPartnerBillController,
|
||||
AdminStoreBillController,
|
||||
AdminStorePayoutController,
|
||||
AdminWineryBillController,
|
||||
PartnerMeController,
|
||||
@@ -19,6 +20,7 @@ import {
|
||||
PartnerMeController,
|
||||
ShopPayoutController,
|
||||
AdminStorePayoutController,
|
||||
AdminStoreBillController,
|
||||
AdminPartnerBillController,
|
||||
AdminWineryBillController,
|
||||
],
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user