This commit is contained in:
mkm 2024-05-08 09:41:50 +08:00
parent 1e744ef493
commit 168bb94274
2 changed files with 21 additions and 0 deletions

View File

@ -189,4 +189,24 @@ class RetailOrderController extends BaseApiController
return $this->fail('取消失败');
}
/**
* 确认收货
*/
public function confirm_receipt(){
$order_id = (int)$this->request->post('order_id');
$where=[
'id'=>$order_id,
'uid'=>$this->userId,
'paid'=>1,
'status'=>1,
];
$order=Cashierclass::where($where)->find();
if($order){
$data=['status'=>2];
Cashierclass::where($where)->update($data);
return $this->success('确认成功');
}
return $this->fail('确认失败');
}
}

View File

@ -54,6 +54,7 @@ class PayNotifyLogic extends BaseLogic
$order = Cashierclass::where('number', $orderSn)->findOrEmpty();
$order->money = bcdiv($extra['amount']['payer_total'],100,2);
$order->paid = 1;
$order->status = 1;
$order->save();
if ($order['cart_id']) {
if (!is_array($order['cart_id'])) {