1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace Tool\MayouTool\Crm;
- use Tool\MayouTool\Bean\Crm\TaobaoBatchSendParamBean;
- use Tool\MayouTool\Exception\CrmException;
- use Tool\MayouTool\HttpCurl;
- class Crm
- {
- /**
- * 淘宝批量发货接口
- * @param $data
- */
- public static function taobaoBatchSend(TaobaoBatchSendParamBean $taobaoBatchSendParamBean)
- {
- $url = "v1/taobao/batchSendProduct";
- $params = [
- "orderNumber"=>$taobaoBatchSendParamBean->getOrderNumber(),
- "sellerNick"=>$taobaoBatchSendParamBean->getSellerNick(),
- "expressNumber"=>$taobaoBatchSendParamBean->getExpressNumber(),
- "expressCode"=>$taobaoBatchSendParamBean->getExpressCode()
- ];
- $res = HttpCurl::postCurl(env("CRM_URL").$url,$params,[],false);
- if(isset($res["status"])&&$res["status"]){
- return $res["data"];
- }
- throw new CrmException("请求失败");
- }
- }
|