fix;提交、

This commit is contained in:
ljy
2026-07-19 22:16:55 +08:00
parent 76270b20bf
commit 792b543ba8
34 changed files with 2310 additions and 398 deletions
@@ -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')