diff --git a/app/admin/controller/store_order/StoreOrderController.php b/app/admin/controller/store_order/StoreOrderController.php index 28b6ab61..96736ad6 100644 --- a/app/admin/controller/store_order/StoreOrderController.php +++ b/app/admin/controller/store_order/StoreOrderController.php @@ -10,6 +10,7 @@ use app\admin\logic\store_order\StoreOrderLogic; use app\admin\logic\store_product\StoreProductLogic; use app\admin\logic\warehouse_product\WarehouseProductLogic; use app\admin\validate\store_order\StoreOrderValidate; +use app\api\logic\order\OrderLogic; use app\common\enum\PayEnum; use app\common\logic\PayNotifyLogic; use app\common\model\delivery_service\DeliveryService; @@ -139,7 +140,25 @@ class StoreOrderController extends BaseAdminController $refundOrderService->refund($detail['uid'], $params); return $this->success('退款成功',[],1,1); } - + /** + * 核销 + */ + public function writeoff_order() + { + $params =$this->request->post(); + if (empty($params['verify_code'])) { + return $this->fail('核销码不存在'); + } + if (empty($params['store_id'])) { + return $this->fail('门店id不存在'); + } + $params['staff_id']=0; + $res = OrderLogic::writeOff($params); + if ($res) { + return $this->success('核销成功',[],1,1); + } + return $this->fail('核销失败'); + } /** * 设置配送员 */