|
|
@@ -27,4 +27,19 @@ class OrderController extends BaseApiController
|
|
|
}
|
|
|
return $this->data($result);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 取消订单
|
|
|
+ */
|
|
|
+ public function cancelOrder()
|
|
|
+ {
|
|
|
+ $params = (new ShopOrderValidate())->goCheck('detail',[
|
|
|
+ 'worker_id' => $this->userId,
|
|
|
+ ]);
|
|
|
+ $result = ShopOrderLogic::cancelOrder($params);
|
|
|
+ if (false === $result) {
|
|
|
+ return $this->fail(ShopOrderLogic::getError());
|
|
|
+ }
|
|
|
+ return $this->success('取消成功', [], 1, 1);
|
|
|
+ }
|
|
|
}
|