修改订单结算路由
This commit is contained in:
parent
efaf48186b
commit
64516b41d4
@ -338,6 +338,39 @@ class StoreOrder extends BaseController
|
||||
return app('json')->success('订单核销成功');
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单结算
|
||||
* @return mixed
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
*/
|
||||
public function settle(StoreOrderRepository $repository)
|
||||
{
|
||||
$id = $this->request->param('id/d');
|
||||
$payType = $this->request->param('pay_type');
|
||||
try {
|
||||
$data = $repository->settle($id, $payType, $this->request->userInfo());
|
||||
return app('json')->success('success', $data);
|
||||
} catch (\Exception $e) {
|
||||
return app('json')->fail($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认接单
|
||||
* @return mixed
|
||||
*/
|
||||
public function confirm(StoreOrderRepository $repository)
|
||||
{
|
||||
$id = $this->request->param('id/d');
|
||||
$type = $this->request->param('type/d');
|
||||
try {
|
||||
$repository->confirm($this->request->userInfo(), $id, $type);
|
||||
return app('json')->success('success');
|
||||
} catch (\Exception $e) {
|
||||
return app('json')->fail($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 采购订单列表
|
||||
* @param $merId
|
||||
|
@ -302,37 +302,4 @@ class StoreOrder extends BaseController
|
||||
return app('json')->success($res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单结算
|
||||
* @return mixed
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
*/
|
||||
public function settle()
|
||||
{
|
||||
$id = $this->request->param('id/d');
|
||||
$payType = $this->request->param('pay_type');
|
||||
try {
|
||||
$data = $this->repository->settle($id, $payType, $this->request->userInfo());
|
||||
return app('json')->success('success', $data);
|
||||
} catch (\Exception $e) {
|
||||
return app('json')->fail($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认接单
|
||||
* @return mixed
|
||||
*/
|
||||
public function confirm()
|
||||
{
|
||||
$id = $this->request->param('id/d');
|
||||
$type = $this->request->param('type/d');
|
||||
try {
|
||||
$this->repository->confirm($this->request->userInfo(), $id, $type);
|
||||
return app('json')->success('success');
|
||||
} catch (\Exception $e) {
|
||||
return app('json')->fail($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -90,8 +90,6 @@ Route::group('api/', function () {
|
||||
Route::get('verify_code/:id', '/verifyCode');
|
||||
Route::post('receipt/:id', '/createReceipt');
|
||||
Route::get('delivery/:id', '/getOrderDelivery');
|
||||
Route::post('settle', '/settle');
|
||||
Route::post('confirm', '/confirm');
|
||||
})->prefix('api.store.order.StoreOrder');
|
||||
|
||||
// 预售
|
||||
@ -311,6 +309,8 @@ Route::group('api/', function () {
|
||||
Route::get('/delivery_config', '/getDeliveryConfig');
|
||||
Route::get('/delivery_options', '/getDeliveryOptions');
|
||||
Route::get('/purchaseOrder', '/purchaseOrder');
|
||||
Route::post('/settle', '/settle');
|
||||
Route::post('/confirm', '/confirm');
|
||||
|
||||
})->prefix('api.server.StoreOrder')->middleware(\app\common\middleware\MerchantServerMiddleware::class,0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user