You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pdd-order-api/app/libs/controller/order/class.WaybillController.php

85 lines
3.5 KiB
PHP

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php
use Service\OrderPrint\WaybillService;
class WaybillController extends AbstractApiController {
private $waybillService;
public function __construct($route) {
parent::__construct($route);
$this->waybillService = WaybillService::instance();
}
/**
* @api GET 获取物流单号列表
* @param array authMallIds 店铺id
* @param string startTime 开始时间
* @param string endTime 结束时间
* @param string tradeId 订单号
* @param string waybillCode 物流单号
* @param string receiverName 收件人
* @param string receiverMobile 手机
* @param string logisticsId 快递ID
* @param string waybillFrom 面单来源菜鸟官方cainiao,网点wangdian,淘宝菜鸟tbCainiao,抖店云dd,快手云ks示例cainiao
* @param string provinceIds 省份
* @param string isExclude 是否排除地区0,1
* @param string status 面单状态
* @param int page 页码
* @param int pageSize 每页数量
*/
public function searchWaybillList() {
$data = $this->waybillService->searchWaybillList($this->mallId, $_GET);
return $this->renderSuccess($data);
}
/**
* @api POST 面单回收
* @param Waybill[] waybills 运单号
* @param int Waybill.mallId 运单号
* @param int Waybill.logisticsId 运单号
* @param string Waybill.waybillCode 运单号
* @param string isForceCancel 是否强制删除0/1
*/
public function recycleWaybills() {
$data = $this->waybillService->recycleWaybills($_POST['waybills'], $_POST['isForceCancel'], CommonTool::getOperatorInfo());
return $this->renderSuccess($data);
}
/**
* @api POST 获取快递单打印信息
* @param int expressTplId 模板id
* @param string printFrom 打印来源示例orderexpressTplIdpurchaseOrderpurchaseOrder
* @param int useNewWaybill 是否使用新面单
* @param int printCount 打印份数
* @param int cpCode 快递公司编码
* @param int expressType 快递类型
* @param int waybillType 面单类型
* @param boolean isTest 是否测试
* @param string[] senderAddress 发货地址
* @param trade[] printDataList 打印订单列表
* @param string trade.tradeKey 主订单号
* @param string[] trade.orderIds 订单id
* @param int trade.venderId 店铺id
* @param string trade.orderFrom 订单来源
* @param string trade.printWaybillCode 指定打印快递单号
* @param string trade.printPackageCount 指定打印包裹数量
* @param string trade.printPackageId 指定打印包裹id
* @param expressItem[] trade.expressItems 快递单信息列表,格式同订单列表返回
* @param order[] trade.orders 订单信息,格式同订单列表返回
* @param object trade.consignee 收件人信息,格式同订单列表返回
*/
public function getWaybillPrintDetail() {
$waybillDetail = $this->waybillService->getWaybillPrintDetail($_POST, CommonTool::getOperatorInfo());
return $this->renderSuccess($waybillDetail);
}
/**
* @api GET 获取二段码图片
* @param string secondSectionCode * 二段码
* @param double width * 宽度
*/
public function getSecondSectionCodeWatermark() {
$secondSectionCodeWatermark = $this->waybillService->getSecondSectionCodeWatermark($_GET['secondSectionCode'], $_GET['width']);
return $this->renderSuccess(['secondSectionCodeWatermark' => $secondSectionCodeWatermark]);
}
}