feat(store_order): 添加订单核销功能
- 新增 writeoff_order 方法实现订单核销功能 - 增加核销码和门店 ID 的参数验证 - 调用 OrderLogic::writeOff 方法进行订单核销 - 返回核销成功或失败的响应
This commit is contained in:
parent
cc8eb3e72f
commit
768068a8ea
@ -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('核销失败');
|
||||
}
|
||||
/**
|
||||
* 设置配送员
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user