Commit 16c6a9ef by xmy

Merge branch 'ft-immediateDelivery'

parents 7454608e 3c438075
......@@ -261,9 +261,9 @@ class Topic
do {
try {
$res = $this->publish_message($cryptMessage, $vTagList, $routingKey);
if($res['code'] == 0) break;
} catch(\Throwable $e) {
App::error("[消息队列异常]:".var_export($e, true));
if ($res['code'] == 0) break;
} catch (\Throwable $e) {
App::error("[消息队列异常]:" . $e->getFile() . $e->getMessage(), $e->getLine());
}
$tryTimes++;
} while ($tryTimes < 3);
......@@ -277,7 +277,7 @@ class Topic
return $res;
}
protected function TopicLog($message, $cryptMessage, $tagName, $response, $status=0)
protected function TopicLog($message, $cryptMessage, $tagName, $response, $status = 0)
{
$data = [
'tagName' => $tagName,
......@@ -291,8 +291,8 @@ class Topic
try {
$db = CfgCenter::dbConnect();
$db->insert('topic_log', $data);
}catch (\Exception $e){
App::error("消息主题日志记录失败:".$e->getMessage().'---'.json_encode($data));
} catch (\Exception $e) {
App::error("消息主题日志记录失败:" . $e->getMessage() . '---' . json_encode($data));
}
}
}
......@@ -30,6 +30,7 @@ class CfgCenter
const MP_OEMADM = 'mp_oemadm'; // OEM机构管理员公众号后台,使用云脉科技公众号
const TRAFFIC_BACKEND_WEAPP = 'traffic_backend_weapp'; //流量平台业务员端小程序
const TRAFFIC_FRONTEND_WEAPP = 'traffic_frontend_weapp'; //流量平台买家端小程序
const CATERING_WEAPP = 'catering_weapp'; //餐饮小程序
/**
* 根据用户token获取配置, 优先使用此方法读取配置
......
......@@ -16,6 +16,7 @@ class GoodsEnum
const SERVER_GOODS = 1;//服务商品
const ENTITY_GOODS = 2;//实体商品
const TAKE_OUT_GOODS = 3;//外卖商品
const FREIGHT_FREE = 1; //包邮
......
<?php
namespace Hdll\Services\Logistics\Enum;
class LogisticsCmqEnum
{
const TOPIC = 'logistics';
const TOPIC_CMQ_RECHARGE = 'Recharge';//充值回调cmq
}
\ No newline at end of file
......@@ -2,6 +2,8 @@
namespace Hdll\Services\Logistics\Lib;
use App\Exception\BaseException;
use App\Exception\RpcException;
use Swoft\Core\ResultInterface;
/**
......@@ -15,6 +17,9 @@ interface LogisticsInterface
public function onPath(array $param);
public function imOnPath(array $param);
/**
* 获取运费
* @param $storeId
......@@ -31,4 +36,82 @@ interface LogisticsInterface
* @return mixed
*/
public function getReceiver($id, $storeId);
/**
* 获取即时配送收货人地址
* @param $id
* @param $storeId
* @return array
*/
public function getImReceiver($id, $storeId);
/**
* 预下单
* @param $storeId
* @param $buyerId
* @param array $receiver 收货人信息
* @param $items 商品信息
* [
* ['name'=>'商品名称','image'=>'shang_pin_tu_pian'],
* ['name'=>'商品名称','image'=>'shang_pin_tu_pian'],
* ]
* @param $unique
* @param $orderSn 订单号
* @param $price 商品总价
* @param $deliveryCode 配送服务代码 不同配送公司自定义, 顺丰和达达不填
* @return mixed
*/
public function preOrder($storeId, $buyerId, array $receiver, $items, $unique, $orderSn, $price, $deliveryCode = null);
/**
* 下单
* @param $storeId
* @param $buyerId
* @param array $receiver 收货人信息
* @param $orderSn 订单号
* @param $deliveryCode 配送服务代码 不同配送公司自定义, 顺丰和达达不填
* @return mixed
*/
public function order($storeId, $buyerId, array $receiver, $orderSn, $deliveryCode = null);
/**
* 获取账号信息
* @param $condition
* @param string[] $fields
* @return mixed
*/
public function getAccountByCondition($condition, $fields = ['*']);
/**
* 获取即时配送物流订单
* @param $orderIds
* @param string[] $fields
* @return mixed
*/
public function getByMainOrderIds($storeId, $orderIds, $fields = ['*']);
/**
* 获取物流状态
* @param $orderIds
* @return mixed
*/
public function getPathByMainOrderIds($storeId, $orderIds);
/**
* 取消物流订单
* @param $storeId
* @param $orderSn
* @param string $cancelReason
* @return mixed
*/
public function cancelOrder($storeId, $orderSn, $cancelReason = '');
/**
* 获取充值订单
* @param $orderSn
* @return mixed
*/
public function getRechargeOrder($orderSn);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment