小飞侠接口
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
import { Body, Controller, Get, Post, UseGuards } from '@nestjs/common';
|
||||
import { HqAuthGuard } from '../../common/guards/hq-auth.guard';
|
||||
import { AdminXiaofeixiaService } from './admin-xiaofeixia.service';
|
||||
import {
|
||||
XiaofeixiaBatchShipmentQueryDto,
|
||||
XiaofeixiaCheckCoverageDto,
|
||||
XiaofeixiaCreateShipmentDto,
|
||||
XiaofeixiaEstimateFreightDto,
|
||||
XiaofeixiaShipmentQueryDto,
|
||||
} from './dto/admin-courier.dto';
|
||||
|
||||
/** HQ 小飞侠接口联调(仅管理端,勿对 C 端暴露) */
|
||||
@Controller('admin/courier/xiaofeixia')
|
||||
@UseGuards(HqAuthGuard)
|
||||
export class AdminXiaofeixiaController {
|
||||
constructor(private readonly service: AdminXiaofeixiaService) {}
|
||||
|
||||
@Get('config')
|
||||
getConfig() {
|
||||
return this.service.getConfig();
|
||||
}
|
||||
|
||||
@Post('estimate-freight')
|
||||
estimateFreight(@Body() body: XiaofeixiaEstimateFreightDto) {
|
||||
return this.service.estimateFreight(body);
|
||||
}
|
||||
|
||||
@Post('check-coverage')
|
||||
checkCoverage(@Body() body: XiaofeixiaCheckCoverageDto) {
|
||||
return this.service.checkCoverage(body);
|
||||
}
|
||||
|
||||
@Post('create-shipment')
|
||||
createShipment(@Body() body: XiaofeixiaCreateShipmentDto) {
|
||||
return this.service.createShipment(body);
|
||||
}
|
||||
|
||||
@Post('cancel-shipment')
|
||||
cancelShipment(@Body() body: XiaofeixiaShipmentQueryDto) {
|
||||
return this.service.cancelShipment(body);
|
||||
}
|
||||
|
||||
@Post('get-shipment')
|
||||
getShipment(@Body() body: XiaofeixiaShipmentQueryDto) {
|
||||
return this.service.getShipment(body);
|
||||
}
|
||||
|
||||
@Post('batch-get-shipments')
|
||||
batchGetShipments(@Body() body: XiaofeixiaBatchShipmentQueryDto) {
|
||||
return this.service.batchGetShipments(body);
|
||||
}
|
||||
|
||||
@Post('get-track')
|
||||
getTrack(@Body() body: XiaofeixiaShipmentQueryDto) {
|
||||
return this.service.getTrack(body);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user