新增获取配送员信息接口
This commit is contained in:
parent
2b4582dacd
commit
27661867ef
@ -15,6 +15,8 @@
|
|||||||
namespace app\api\controller;
|
namespace app\api\controller;
|
||||||
|
|
||||||
use app\api\logic\LogisticsLogic;
|
use app\api\logic\LogisticsLogic;
|
||||||
|
use app\common\model\logistics\Logistics;
|
||||||
|
use think\response\Json;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物流管理
|
* 物流管理
|
||||||
@ -35,7 +37,7 @@ class LogisticsController extends BaseApiController
|
|||||||
* @param int $page_num 页码
|
* @param int $page_num 页码
|
||||||
* @return \think\response\Json
|
* @return \think\response\Json
|
||||||
*/
|
*/
|
||||||
public function courierLogisticsList(): \think\response\Json
|
public function courierLogisticsList(): Json
|
||||||
{
|
{
|
||||||
//获取参数
|
//获取参数
|
||||||
$params = $this->request->get(['user_id','user_type','status','page_size','page_num','keywords']);
|
$params = $this->request->get(['user_id','user_type','status','page_size','page_num','keywords']);
|
||||||
@ -54,7 +56,7 @@ class LogisticsController extends BaseApiController
|
|||||||
* @param int $logistics_id 物流id
|
* @param int $logistics_id 物流id
|
||||||
* @return \think\response\Json
|
* @return \think\response\Json
|
||||||
*/
|
*/
|
||||||
public function courierLogisticsDetail(): \think\response\Json
|
public function courierLogisticsDetail(): Json
|
||||||
{
|
{
|
||||||
//获取参数
|
//获取参数
|
||||||
$logistics_id = $this->request->get('logistics_id');
|
$logistics_id = $this->request->get('logistics_id');
|
||||||
@ -71,7 +73,7 @@ class LogisticsController extends BaseApiController
|
|||||||
* @param string $order_sn 订单编号
|
* @param string $order_sn 订单编号
|
||||||
* @return \think\response\Json
|
* @return \think\response\Json
|
||||||
*/
|
*/
|
||||||
public function logisticsCreate(): \think\response\Json
|
public function logisticsCreate(): Json
|
||||||
{
|
{
|
||||||
//获取参数
|
//获取参数
|
||||||
$params = $this->request->post(['order_id','order_sn']);
|
$params = $this->request->post(['order_id','order_sn']);
|
||||||
@ -89,7 +91,7 @@ class LogisticsController extends BaseApiController
|
|||||||
* @param int $logistics_id 物流id
|
* @param int $logistics_id 物流id
|
||||||
* @return \think\response\Json
|
* @return \think\response\Json
|
||||||
*/
|
*/
|
||||||
public function courierTakeGoods(): \think\response\Json
|
public function courierTakeGoods(): Json
|
||||||
{
|
{
|
||||||
//获取参数
|
//获取参数
|
||||||
$params = $this->request->post(['logistics_id','order_id','order_sn']);
|
$params = $this->request->post(['logistics_id','order_id','order_sn']);
|
||||||
@ -107,7 +109,7 @@ class LogisticsController extends BaseApiController
|
|||||||
* @param int $logistics_id 物流id
|
* @param int $logistics_id 物流id
|
||||||
* @return \think\response\Json
|
* @return \think\response\Json
|
||||||
*/
|
*/
|
||||||
public function courierCompleteDelivery(): \think\response\Json
|
public function courierCompleteDelivery(): Json
|
||||||
{
|
{
|
||||||
//获取参数
|
//获取参数
|
||||||
$params = $this->request->post(['logistics_id','take_code']);
|
$params = $this->request->post(['logistics_id','take_code']);
|
||||||
@ -125,7 +127,7 @@ class LogisticsController extends BaseApiController
|
|||||||
* @param int $logistics_id 物流id
|
* @param int $logistics_id 物流id
|
||||||
* @return \think\response\Json
|
* @return \think\response\Json
|
||||||
*/
|
*/
|
||||||
public function userCancelOrder(): \think\response\Json
|
public function userCancelOrder(): Json
|
||||||
{
|
{
|
||||||
//获取参数
|
//获取参数
|
||||||
$params = $this->request->post(['order_id','order_sn']);
|
$params = $this->request->post(['order_id','order_sn']);
|
||||||
@ -143,7 +145,7 @@ class LogisticsController extends BaseApiController
|
|||||||
* @param int $logistics_id 物流id
|
* @param int $logistics_id 物流id
|
||||||
* @return \think\response\Json
|
* @return \think\response\Json
|
||||||
*/
|
*/
|
||||||
public function userLogisticsDetail(): \think\response\Json
|
public function userLogisticsDetail(): Json
|
||||||
{
|
{
|
||||||
//获取参数
|
//获取参数
|
||||||
$params = $this->request->get(['order_id','order_sn']);
|
$params = $this->request->get(['order_id','order_sn']);
|
||||||
@ -154,7 +156,7 @@ class LogisticsController extends BaseApiController
|
|||||||
}
|
}
|
||||||
|
|
||||||
//获取配送员
|
//获取配送员
|
||||||
public function hasCourier(): \think\response\Json {
|
public function hasCourier(): Json {
|
||||||
//获取参数
|
//获取参数
|
||||||
$param = $this->request->get('user_address_code');
|
$param = $this->request->get('user_address_code');
|
||||||
if(empty($param)) {
|
if(empty($param)) {
|
||||||
@ -169,4 +171,24 @@ class LogisticsController extends BaseApiController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取配送员信息
|
||||||
|
public function courierData(): Json
|
||||||
|
{
|
||||||
|
$params = $this->request->get(['order_sn']);
|
||||||
|
if(empty($params['order_sn'])){
|
||||||
|
return $this->fail('参数错误');
|
||||||
|
}
|
||||||
|
$data = Logistics::where('order_sn',$params['order_sn'])->findOrEmpty();
|
||||||
|
if($data->isEmpty()){
|
||||||
|
return $this->fail('订单信息错误');
|
||||||
|
}
|
||||||
|
$result = [
|
||||||
|
'courier_id' => $data['courier_id'],
|
||||||
|
'courier_name' => $data['courier_name'],
|
||||||
|
'courier_phone' => $data['courier_phone'],
|
||||||
|
'courier_company' => $data['courier_company'],
|
||||||
|
];
|
||||||
|
return $this->success('请求成功',$result);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user