|
@@ -347,7 +347,7 @@ class KangyangCityController extends Curd
|
|
|
$params['order_amount_paid'] = $paidOrder->order_amount_paid;
|
|
|
$paidOrder->order_amount_paid = $paidOrder->order_amount_paid + $params['order_amount_pay'];
|
|
|
$paidOrder->order_amount_pay = $paidOrder->order_amount_paid;
|
|
|
- if (intval($paidOrder->order_amount_pay) >= 24000) {
|
|
|
+ if (floatval($paidOrder->order_amount_paid) >= $paidOrder->order_amount_total) {
|
|
|
$paidOrder->order_is_complete = 'Y';
|
|
|
$paidOrder->order_status_system = 'DONE';
|
|
|
$paidOrder->order_status_payment = 'SUCCESS';
|
|
@@ -360,7 +360,7 @@ class KangyangCityController extends Curd
|
|
|
// $params['order_express_goods'] = json_encode(['sheet' => [$sheetId]]);
|
|
|
|
|
|
// 2.4W 康养城
|
|
|
- if ($params['goods_classify'] == 'VIP' && $params['order_status_payment'] == 'SUCCESS' && (!empty($paidOrder) && intval($paidOrder->order_amount_paid + $params['order_amount_pay']) >= 24000 || intval($params['order_amount_pay']) >= 24000)) {
|
|
|
+ if ($params['goods_classify'] == 'VIP' && $params['order_status_payment'] == 'SUCCESS' && (!empty($paidOrder) && floatval($paidOrder->order_amount_paid) >= $paidOrder->order_amount_total || floatval($params['order_amount_pay']) >= $params['order_amount_total'])) {
|
|
|
$params['member_id'] = $params['join_order_member_id'];
|
|
|
Event::dispatch('order.kangyangCityVIP.grant', $params);
|
|
|
}
|
|
@@ -506,17 +506,17 @@ class KangyangCityController extends Curd
|
|
|
SysDept::where('dept_id', $orderConfigJson['tableid'])->where('dept_category', '桌台')->update(['dept_status' => 'ACTIVED']);
|
|
|
}
|
|
|
$order->order_config_json = json_encode($orderConfigJson);
|
|
|
+ $order->order_amount_paid = $order->order_amount_paid + $params['order_amount_pay'];
|
|
|
+ $order->order_amount_pay = $order->order_amount_paid;
|
|
|
// 康养城订单,支付完就结束了
|
|
|
- if ($order->order_status_payment == 'SUCCESS' && $params['goods_classify'] == 'VIP' && intval($order->order_amount_paid + $params['order_amount_pay']) >= 24000) {
|
|
|
+ if ($order->order_status_payment == 'SUCCESS' && $params['goods_classify'] == 'VIP' && floatval($order->order_amount_paid) >= $order->order_amount_total) {
|
|
|
$order->order_is_complete = 'Y';
|
|
|
}
|
|
|
- if (intval($order->order_amount_paid + $params['order_amount_pay']) < 24000) {
|
|
|
+ if (floatval($order->order_amount_paid) < $order->order_amount_total) {
|
|
|
$order->order_status_system = 'PAYING';
|
|
|
$order->order_status_payment = 'PENDING';
|
|
|
$order->order_is_complete = 'N';
|
|
|
}
|
|
|
- $order->order_amount_paid = $order->order_amount_paid + $params['order_amount_pay'];
|
|
|
- $order->order_amount_pay = $order->order_amount_paid;
|
|
|
// 主订单
|
|
|
$order->save();
|
|
|
|
|
@@ -572,7 +572,7 @@ class KangyangCityController extends Curd
|
|
|
// }
|
|
|
|
|
|
// 2.4W 康养城
|
|
|
- if ($params['goods_classify'] == 'VIP' && $order->order_status_payment == 'SUCCESS' && intval($order->order_amount_paid + $params['order_amount_pay']) >= 24000) {
|
|
|
+ if ($params['goods_classify'] == 'VIP' && $order->order_status_payment == 'SUCCESS' && floatval($order->order_amount_paid) >= $order->order_amount_total) {
|
|
|
$params['member_id'] = $params['join_order_member_id'];
|
|
|
Event::dispatch('order.kangyangCityVIP.grant', $params);
|
|
|
}
|
|
@@ -642,9 +642,9 @@ class KangyangCityController extends Curd
|
|
|
'order_amount_paid' => $params['order_amount_pay'],
|
|
|
'order_category' => $orderCategory,
|
|
|
'order_classify' => $orderCategory,
|
|
|
- 'order_is_complete' => intval($params['order_amount_pay']) >= 24000 ? 'Y' : 'N',
|
|
|
- 'order_status_system' => intval($params['order_amount_pay']) >= 24000 ? 'DONE' : 'PAYING',
|
|
|
- 'order_status_payment' => intval($params['order_amount_pay']) >= 24000 ? 'SUCCESS' : 'PENDING',
|
|
|
+ 'order_is_complete' => floatval($params['order_amount_pay']) >= floatval($params['order_amount_total']) ? 'Y' : 'N',
|
|
|
+ 'order_status_system' => floatval($params['order_amount_pay']) >= floatval($params['order_amount_total']) ? 'DONE' : 'PAYING',
|
|
|
+ 'order_status_payment' => floatval($params['order_amount_pay']) >= floatval($params['order_amount_total']) ? 'SUCCESS' : 'PENDING',
|
|
|
'order_status_storage' => $params['order_status_storage'],
|
|
|
'order_platform' => $params['order_platform'],
|
|
|
'order_remark' => $params['order_remark'] ?? '',
|