fix;提交、
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
PartnerProxyOrderSendSmsDto,
|
||||
} from './dto/partner-proxy-order.dto';
|
||||
import { ManualShipOrderDto } from '../ops/dto/admin-mutate.dto';
|
||||
import { CreateAfterSaleTicketDto, CreateInvoiceDto } from './dto/after-sale.dto';
|
||||
|
||||
@Controller('trade/orders')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@@ -75,6 +76,64 @@ export class TradeController {
|
||||
) {
|
||||
return this.tradeService.createRefundRequest(user.actorId, BigInt(id), body.remark);
|
||||
}
|
||||
|
||||
@Post(':id/after-sale-tickets')
|
||||
createAfterSale(
|
||||
@CurrentUser() user: AuthUser,
|
||||
@Param('id') id: string,
|
||||
@Body() body: CreateAfterSaleTicketDto,
|
||||
) {
|
||||
return this.tradeService.createAfterSaleTicket(user.actorId, BigInt(id), body);
|
||||
}
|
||||
|
||||
@Post(':id/invoices')
|
||||
createInvoice(
|
||||
@CurrentUser() user: AuthUser,
|
||||
@Param('id') id: string,
|
||||
@Body() body: CreateInvoiceDto,
|
||||
) {
|
||||
return this.tradeService.createInvoice(user.actorId, BigInt(id), body);
|
||||
}
|
||||
}
|
||||
|
||||
@Controller('trade/after-sale-tickets')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
export class TradeAfterSaleTicketController {
|
||||
constructor(private readonly tradeService: TradeService) {}
|
||||
|
||||
@Get()
|
||||
list(
|
||||
@CurrentUser() user: AuthUser,
|
||||
@Query('page') page = '1',
|
||||
@Query('pageSize') pageSize = '20',
|
||||
) {
|
||||
return this.tradeService.listAfterSaleTickets(user.actorId, Number(page), Number(pageSize));
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
detail(@CurrentUser() user: AuthUser, @Param('id') id: string) {
|
||||
return this.tradeService.getAfterSaleTicket(user.actorId, BigInt(id));
|
||||
}
|
||||
}
|
||||
|
||||
@Controller('trade/invoices')
|
||||
@UseGuards(JwtAuthGuard)
|
||||
export class TradeInvoiceController {
|
||||
constructor(private readonly tradeService: TradeService) {}
|
||||
|
||||
@Get()
|
||||
list(
|
||||
@CurrentUser() user: AuthUser,
|
||||
@Query('page') page = '1',
|
||||
@Query('pageSize') pageSize = '20',
|
||||
) {
|
||||
return this.tradeService.listInvoices(user.actorId, Number(page), Number(pageSize));
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
detail(@CurrentUser() user: AuthUser, @Param('id') id: string) {
|
||||
return this.tradeService.getInvoice(user.actorId, BigInt(id));
|
||||
}
|
||||
}
|
||||
|
||||
@Controller('partner/orders')
|
||||
|
||||
Reference in New Issue
Block a user