feat(OrderController): 修改拆单逻辑,增加退款判断
This commit is contained in:
parent
2d3b99b370
commit
fa559efd5c
@ -456,9 +456,9 @@ class OrderController extends BaseApiController
|
||||
$params = (new OrderValidate())->post()->goCheck('add');
|
||||
$uid = $this->userId;
|
||||
//拆单逻辑
|
||||
OrderLogic::dealRefund($uid, $params);
|
||||
$detail = StoreOrder::where('id', $params['id'])->where('refund_type',1)->where('status','in',[0,1])->find();
|
||||
if($detail){
|
||||
$res=OrderLogic::dealRefund($uid, $params);
|
||||
$detail = StoreOrder::where('id', $params['id'])->where('refund_type',1)->find();
|
||||
if($detail && $res!=2){
|
||||
$res=StoreOrderLogic::refund($detail,['order_id'=>$detail['order_id']]);
|
||||
if($res!=false){
|
||||
return $this->success($res);
|
||||
|
@ -832,7 +832,7 @@ class OrderLogic extends BaseLogic
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
return $order['status']??1;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user