更新收货码
This commit is contained in:
parent
eb09c262f9
commit
7003875c50
@ -1511,16 +1511,4 @@ class Auth extends BaseController
|
||||
$data = $repository->getResult($type);
|
||||
return app('json')->success($data);
|
||||
}
|
||||
|
||||
public function merlogisticsCode($mer_id, $id)
|
||||
{
|
||||
$storeInfo = Db::name('store_service')->where('mer_id', $mer_id)->find();
|
||||
if (!$storeInfo)
|
||||
return app('json')->fail('商户信息有误');
|
||||
$make = app()->make(StoreOrderRepository::class);
|
||||
$order = $make->getWhere(['order_id' => $id, 'mer_id' => $storeInfo['mer_id'], 'is_del' => 0]);
|
||||
if (!$order)
|
||||
return app('json')->fail('订单状态有误');
|
||||
return app('json')->success(['qrcode' => $make->logisticsQrcode($id, $order->order_sn)]);
|
||||
}
|
||||
}
|
||||
|
@ -375,6 +375,21 @@ class Order extends BaseController
|
||||
return app('json')->success($this->repository->express($id, $this->request->merId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置取货码
|
||||
*/
|
||||
public function qrcode($id)
|
||||
{
|
||||
$storeInfo = Db::name('store_service')->where('mer_id', $this->request->merId())->find();
|
||||
if (!$storeInfo)
|
||||
return app('json')->fail('商户信息有误');
|
||||
$make = app()->make(StoreOrderRepository::class);
|
||||
$order = $make->getWhere(['order_id' => $id, 'mer_id' => $storeInfo['mer_id'], 'is_del' => 0]);
|
||||
if (!$order)
|
||||
return app('json')->fail('订单状态有误');
|
||||
return app('json')->success(['qrcode' => $make->logisticsQrcode($id, $order->order_sn)]);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* @param $id
|
||||
|
@ -21,7 +21,6 @@ use think\facade\Route;
|
||||
|
||||
Route::group('api/', function () {
|
||||
Route::any('test', 'api.Auth/test');
|
||||
Route::get('mer/:mer_id/logistics_code/:id', 'api.Auth/merlogisticsCode');
|
||||
Route::any('dotest', 'api.Auth/dotest');
|
||||
Route::post('merchant/syncStatus/:id', 'api.Auth/merchantStatus');
|
||||
Route::get('business/agree', 'api.Auth/businessAgree');
|
||||
|
@ -52,6 +52,10 @@ Route::group(function () {
|
||||
'_alias' => '列表',
|
||||
]);
|
||||
|
||||
Route::get('qrcode/:id', 'Order/qrcode')->name('merchantStoreOrderQrcode')->option([
|
||||
'_alias' => '订单收货码',
|
||||
]);
|
||||
|
||||
Route::get('express/:id', 'Order/express')->name('merchantStoreOrderExpress')->option([
|
||||
'_alias' => '快递查询',
|
||||
]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user