|
@@ -197,7 +197,7 @@ class WholeController extends Curd
|
|
|
} elseif ($timeType == 'pay') {
|
|
|
$where['order_id'] = ['in', implode(',', $payOrderIds)];
|
|
|
}
|
|
|
- // 自提订单
|
|
|
+ // 自提订单
|
|
|
if (!empty($where['order_status_system']) && $where['order_status_system'] == 'PICKUP') {
|
|
|
$where['order_is_complete'] = 'N';
|
|
|
$where['order_status_system'] = 'SENDING';
|
|
@@ -1331,7 +1331,7 @@ class WholeController extends Curd
|
|
|
// 2.4W 康养城
|
|
|
if ($params['goods_classify'] == 'VIP' && $order->order_status_payment == 'SUCCESS') {
|
|
|
$params['member_id'] = $params['join_order_member_id'];
|
|
|
- Event::dispatch('order . kangyangCityVIP . grant', $params);
|
|
|
+ Event::dispatch('order.kangyangCityVIP.grant', $params);
|
|
|
}
|
|
|
|
|
|
Db::commit();
|
|
@@ -1341,12 +1341,12 @@ class WholeController extends Curd
|
|
|
// 加销售量
|
|
|
OrderSheetService::addGoodsSales($params['orderId']);
|
|
|
// 完成订单
|
|
|
- Event::dispatch('order . complete', $params);
|
|
|
+ Event::dispatch('order.complete', $params);
|
|
|
// 上级提成
|
|
|
- Event::dispatch('commission . order', $params);
|
|
|
+ Event::dispatch('commission.order', $params);
|
|
|
// 入收支明细表
|
|
|
$params['inout_category'] = $oldOrderPaymentStatus == 'AWAITING' ? '挂账订单结算' : '餐饮订单';
|
|
|
- Event::dispatch('statistics . inout . in', $params);
|
|
|
+ Event::dispatch('statistics.inout.in', $params);
|
|
|
}
|
|
|
|
|
|
// 打小票
|
|
@@ -1839,7 +1839,7 @@ class WholeController extends Curd
|
|
|
// 2.4W 康养城
|
|
|
if ($params['goods_classify'] == 'VIP' && $order->order_status_payment == 'SUCCESS') {
|
|
|
$params['member_id'] = $params['join_order_member_id'];
|
|
|
- Event::dispatch('order . kangyangCityVIP . grant', $params);
|
|
|
+ Event::dispatch('order.kangyangCityVIP.grant', $params);
|
|
|
}
|
|
|
|
|
|
Db::commit();
|
|
@@ -1848,12 +1848,12 @@ class WholeController extends Curd
|
|
|
// 加销售量
|
|
|
OrderSheetService::addGoodsSales($params['orderId']);
|
|
|
// 完成订单
|
|
|
- Event::dispatch('order . complete', $params);
|
|
|
+ Event::dispatch('order.complete', $params);
|
|
|
// 上级提成
|
|
|
- Event::dispatch('commission . order', $params);
|
|
|
+ Event::dispatch('commission.order', $params);
|
|
|
// 入收支明细表
|
|
|
$params['inout_category'] = $oldOrderPaymentStatus == 'AWAITING' ? '挂账订单结算' : '餐饮订单';
|
|
|
- Event::dispatch('statistics . inout . in', $params);
|
|
|
+ Event::dispatch('statistics.inout.in', $params);
|
|
|
}
|
|
|
|
|
|
// 打小票
|
|
@@ -2588,7 +2588,7 @@ class WholeController extends Curd
|
|
|
// 2.4W 康养城
|
|
|
if ($params['goods_classify'] == 'VIP' && $params['order_status_payment'] == 'SUCCESS') {
|
|
|
$params['member_id'] = $params['join_order_member_id'];
|
|
|
- Event::dispatch('order . kangyangCityVIP . grant', $params);
|
|
|
+ Event::dispatch('order.kangyangCityVIP.grant', $params);
|
|
|
}
|
|
|
|
|
|
Db::commit();
|
|
@@ -2596,12 +2596,12 @@ class WholeController extends Curd
|
|
|
// 触发事件
|
|
|
if (!empty($params['order_is_complete']) && $params['order_is_complete'] == 'Y' && $params['order_status_payment'] == 'SUCCESS') {
|
|
|
// 订单完成
|
|
|
- Event::dispatch('order . complete', $params);
|
|
|
+ Event::dispatch('order.complete', $params);
|
|
|
// 上级提成
|
|
|
- Event::dispatch('commission . order', $params);
|
|
|
+ Event::dispatch('commission.order', $params);
|
|
|
// 入收支明细表
|
|
|
$params['inout_category'] = '餐饮订单';
|
|
|
- Event::dispatch('statistics . inout . in', $params);
|
|
|
+ Event::dispatch('statistics.inout.in', $params);
|
|
|
}
|
|
|
|
|
|
// 打小票
|
|
@@ -3157,7 +3157,7 @@ class WholeController extends Curd
|
|
|
// 2.4W 康养城
|
|
|
if ($params['goods_classify'] == 'VIP' && intval($params['order_amount_pay']) == 24000 && $params['order_status_payment'] == 'SUCCESS') {
|
|
|
$params['member_id'] = $params['join_order_member_id'];
|
|
|
- Event::dispatch('order . kangyangCityVIP . grant', $params);
|
|
|
+ Event::dispatch('order.kangyangCityVIP.grant', $params);
|
|
|
}
|
|
|
|
|
|
Db::commit();
|
|
@@ -3165,12 +3165,12 @@ class WholeController extends Curd
|
|
|
// 触发事件
|
|
|
if (!empty($params['order_is_complete']) && $params['order_is_complete'] == 'Y' && $params['order_status_payment'] == 'SUCCESS') {
|
|
|
// 完成订单
|
|
|
- Event::dispatch('order . complete', $params);
|
|
|
+ Event::dispatch('order.complete', $params);
|
|
|
// 上级提成
|
|
|
- Event::dispatch('commission . order', $params);
|
|
|
+ Event::dispatch('commission.order', $params);
|
|
|
// 入收支明细表
|
|
|
$params['inout_category'] = '餐饮订单';
|
|
|
- Event::dispatch('statistics . inout . in', $params);
|
|
|
+ Event::dispatch('statistics.inout.in', $params);
|
|
|
}
|
|
|
|
|
|
// 打小票
|
|
@@ -3852,7 +3852,7 @@ class WholeController extends Curd
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // 入配送记录表
|
|
|
+ // 入配送记录表
|
|
|
$model->join_express_order_id = $params['order_id'];
|
|
|
if (isset($params['order_express_goods'])) {
|
|
|
$model->order_express_goods = $params['order_express_goods'];
|
|
@@ -3896,7 +3896,7 @@ class WholeController extends Curd
|
|
|
$model->save();
|
|
|
|
|
|
// 事件通知
|
|
|
- Event::dispatch('client_message . delivery', $params);
|
|
|
+ Event::dispatch('client_message.delivery', $params);
|
|
|
if ($params['express_type'] == '自提') {
|
|
|
$order = Order::where('order_id', $request->post('order_id'))->select('join_order_member_id')->first();
|
|
|
if (!empty($order)) {
|
|
@@ -4013,7 +4013,7 @@ class WholeController extends Curd
|
|
|
$params['dept'] = $dept;
|
|
|
$params['write_off_data'] = OrderService::generateWriteOffDataByOrderProcess($params);
|
|
|
// 触发事件
|
|
|
- Event::dispatch('order . write_off', $params);
|
|
|
+ Event::dispatch('order.write_off', $params);
|
|
|
}
|
|
|
|
|
|
Db::commit();
|
|
@@ -4254,7 +4254,7 @@ class WholeController extends Curd
|
|
|
'orderId' => $key,
|
|
|
'submit_premises_id' => $dept['dept_id'] ?? 0,
|
|
|
];
|
|
|
- Event::dispatch('order . complete', $processParams);
|
|
|
+ Event::dispatch('order.complete', $processParams);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -4271,7 +4271,7 @@ class WholeController extends Curd
|
|
|
$params['dept'] = $dept;
|
|
|
$params['write_off_data'] = OrderService::generateWriteOffDataByOrderProcess($params);
|
|
|
// 触发事件
|
|
|
- Event::dispatch('order . write_off', $params);
|
|
|
+ Event::dispatch('order.write_off', $params);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -4479,7 +4479,7 @@ class WholeController extends Curd
|
|
|
'refund_fee' => $amount * 100,
|
|
|
'refund_desc' => '退款',
|
|
|
];
|
|
|
- $res = Pay::wechat(config('payment . wxpay'))->refund($data);
|
|
|
+ $res = Pay::wechat(config('payment.wxpay'))->refund($data);
|
|
|
$resArray = json_decode($res, true);
|
|
|
if (!$resArray['result_code'] == 'SUCCESS' || !$resArray['return_code'] == 'SUCCESS') {
|
|
|
throw new PayException("退款失败");
|
|
@@ -4490,7 +4490,7 @@ class WholeController extends Curd
|
|
|
'out_trade_no' => $order->order_groupby,
|
|
|
'refund_amount' => $amount,
|
|
|
];
|
|
|
- $res = Pay::alipay(config('payment . alipay'))->refund($data);
|
|
|
+ $res = Pay::alipay(config('payment.alipay'))->refund($data);
|
|
|
$resArray = json_decode($res, true);
|
|
|
if ($resArray['fund_change'] != 'Y' || $resArray['msg'] != 'Success') {
|
|
|
throw new PayException("退款失败");
|
|
@@ -4573,7 +4573,7 @@ class WholeController extends Curd
|
|
|
Db::commit();
|
|
|
|
|
|
// 事件通知
|
|
|
- Event::dispatch('client_message . refund', $order->join_order_member_id);
|
|
|
+ Event::dispatch('client_message.refund', $order->join_order_member_id);
|
|
|
|
|
|
_syslog("退款", "发起退款", json_decode($res), $data);
|
|
|
return json_success("退款成功");
|
|
@@ -4691,7 +4691,7 @@ class WholeController extends Curd
|
|
|
if (!empty($where['order_status_system']) && $where['order_status_system'] == 'PICKUP') {
|
|
|
$where['order_is_complete'] = 'N';
|
|
|
$where['order_status_system'] = 'SENDING';
|
|
|
- $where['order_express . order_express_type'] = '自提';
|
|
|
+ $where['order_express.order_express_type'] = '自提';
|
|
|
}
|
|
|
|
|
|
$query = $this->doSelect($where, $field, $order);
|
|
@@ -5067,7 +5067,7 @@ class WholeController extends Curd
|
|
|
$full = '';
|
|
|
$payStatus = 'N';
|
|
|
if (in_array('WXPAY', $payDetailType)) {
|
|
|
- $result = Pay::wechat(config('payment . wxpay'))->find($order->order_groupby, 'pos');
|
|
|
+ $result = Pay::wechat(config('payment.wxpay'))->find($order->order_groupby, 'pos');
|
|
|
$result = json_decode(json_encode($result), true);
|
|
|
// $result = '{ "return_code":"SUCCESS","return_msg":"OK","result_code":"SUCCESS","mch_id":"1680393367","appid":"wxc6274da7198e3eb4","openid":"o3JAn6Ii_bAlxS-jbNEC4WnPhdwM","is_subscribe":"N","trade_type":"MICROPAY","trade_state":"SUCCESS","bank_type":"OTHERS","total_fee":"3","fee_type":"CNY","cash_fee":"1000","cash_fee_type":"CNY","transaction_id":"4200067718202409250802875650","out_trade_no":"OD24092518408RV7","attach":[],"time_end":"20240925184009","trade_state_desc":"支付成功","nonce_str":"OeGOkjch4eaV5qIt","sign":"6DCB3BFC594EBC018A2BEE2C3DFEA4E3"}';
|
|
|
// $result = json_decode($result, true);
|
|
@@ -5118,7 +5118,7 @@ class WholeController extends Curd
|
|
|
|
|
|
}
|
|
|
} else if (in_array('ALIPAY', $payDetailType)) {
|
|
|
- $result = Pay::alipay(config('payment . alipay'))->find($order->order_groupby);
|
|
|
+ $result = Pay::alipay(config('payment.alipay'))->find($order->order_groupby);
|
|
|
$result = json_decode(json_encode($result), true);
|
|
|
// $result = '{"code":"10000","msg":"Success","buyer_logon_id":"138******93","buyer_pay_amount":"5.87","fund_bill_list":[{"amount":"5.69","fund_channel":"ALIPAYACCOUNT"},{"amount":"0.18","fund_channel":"COUPON"},{"amount":"0.13","fund_channel":"DISCOUNT"}],"invoice_amount":"5.69","out_trade_no":"OD2409251550Q07A","point_amount":"0.00","receipt_amount":"6.00","send_pay_date":"2024-09-25 15:50:22","total_amount":"6.00","trade_no":"2024092523001439431419750998","trade_status":"TRADE_SUCCESS","buyer_open_id":"04309N2aVhSZz4cKwN_DN2DQa7ekM3z5n8kscQHsmIZOJsf"}';
|
|
|
// $result = json_decode($result, true);
|
|
@@ -5187,11 +5187,11 @@ class WholeController extends Curd
|
|
|
|
|
|
if (in_array($order->order_category, ['SERVICE', 'CHNMED', 'CHNNCD', 'PACKAGE', 'GOODS', 'DISHES', 'MEALS'])) {
|
|
|
// 给上级提成
|
|
|
- Event::dispatch('commission . order', $params);
|
|
|
+ Event::dispatch('commission.order', $params);
|
|
|
}
|
|
|
// 收支明细
|
|
|
$params['inout_category'] = $oldOrderPaymentStatus == 'AWAITING' ? '挂账订单结算' : ($order->order_classify == 'VIP' ? ('购买康养城VIP套餐包' . $full) : '餐饮订单');
|
|
|
- Event::dispatch('statistics . inout . in', $params);
|
|
|
+ Event::dispatch('statistics.inout.in', $params);
|
|
|
|
|
|
return json_success('success');
|
|
|
}
|
|
@@ -5230,7 +5230,7 @@ class WholeController extends Curd
|
|
|
Db::beginTransaction();
|
|
|
$payStatus = 'N';
|
|
|
if (in_array('WXPAY', $payDetailType)) {
|
|
|
- $result = Pay::wechat(config('payment . wxpay'))->find($groupId, 'pos');
|
|
|
+ $result = Pay::wechat(config('payment.wxpay'))->find($groupId, 'pos');
|
|
|
$result = json_decode(json_encode($result), true);
|
|
|
// $result = '{"return_code":"SUCCESS","return_msg":"OK","result_code":"SUCCESS","mch_id":"1680393367","appid":"wxc6274da7198e3eb4","openid":"o3JAn6Ii_bAlxS-jbNEC4WnPhdwM","is_subscribe":"N","trade_type":"MICROPAY","trade_state":"SUCCESS","bank_type":"OTHERS","total_fee":"1000","fee_type":"CNY","cash_fee":"1000","cash_fee_type":"CNY","transaction_id":"4200067718202409250802875650","out_trade_no":"OD24092518408RV7","attach":[],"time_end":"20240925184009","trade_state_desc":"支付成功","nonce_str":"OeGOkjch4eaV5qIt","sign":"6DCB3BFC594EBC018A2BEE2C3DFEA4E3"}';
|
|
|
// $result = json_decode($result, true);
|
|
@@ -5266,7 +5266,7 @@ class WholeController extends Curd
|
|
|
}
|
|
|
}
|
|
|
} else if (in_array('ALIPAY', $payDetailType)) {
|
|
|
- $result = Pay::alipay(config('payment . alipay'))->find($groupId);
|
|
|
+ $result = Pay::alipay(config('payment.alipay'))->find($groupId);
|
|
|
$result = json_decode(json_encode($result), true);
|
|
|
// $result = '{"code":"10000","msg":"Success","buyer_logon_id":"138******93","buyer_pay_amount":"5.87","fund_bill_list":[{"amount":"5.69","fund_channel":"ALIPAYACCOUNT"},{"amount":"0.18","fund_channel":"COUPON"},{"amount":"0.13","fund_channel":"DISCOUNT"}],"invoice_amount":"5.69","out_trade_no":"OD2409251550Q07A","point_amount":"0.00","receipt_amount":"6.00","send_pay_date":"2024-09-25 15:50:22","total_amount":"6.00","trade_no":"2024092523001439431419750998","trade_status":"TRADE_SUCCESS","buyer_open_id":"04309N2aVhSZz4cKwN_DN2DQa7ekM3z5n8kscQHsmIZOJsf"}';
|
|
|
// $result = json_decode($result, true);
|