feat(PayNotifyLogic): 修改支付通知逻辑,修复了队长和村长订单获得兑换券的逻辑错误,并优化了相关代码。

This commit is contained in:
mkm 2024-06-23 13:05:52 +08:00
parent 136d9e1714
commit 5ac2750227

View File

@ -518,56 +518,56 @@ class PayNotifyLogic extends BaseLogic
}
if ($fees > 0) {
//村长获得
$sing = [];
// $sing = [];
$sing[] = [
'uid' => $village_uid,
'order_id' => $order['order_id'],
'title' => '村长订单获得兑换券',
'store_id' => $order['store_id'],
'number' => $fees,
'financial_pm' => 1,
'user_ship' => 2,
];
$sing[] = [
'uid' => $brigade_uid,
'order_id' => $order['order_id'],
'title' => '队长订单获得兑换券',
'store_id' => $order['store_id'],
'number' => $fees,
'financial_pm' => 1,
'user_ship' => 3,
];
$sing[] = [
'uid' => $village_uid,
'order_id' => $order['order_id'],
'title' => '订单扣除兑换券',
'store_id' => $order['store_id'],
'number' => $fees,
'financial_pm' => 0,
'user_ship' => 2,
];
$sing[] = [
'uid' => $brigade_uid,
'order_id' => $order['order_id'],
'title' => '订单扣除兑换券',
'store_id' => $order['store_id'],
'number' => $fees,
'financial_pm' => 0,
'user_ship' => 3,
];
// if ($village_uid > 0) {
// $financeLogic->other_arr['vip_uid'] = $village_uid;
// }
// $financeLogic->in($transaction_id, $fees, OrderEnum::VILLAGE_ORDER_OBTAINS, $order['store_id'], 0, 0, $order['pay_type']);
// $financeLogic->out($transaction_id, $fees, OrderEnum::VILLAGE_ORDER_OBTAINS, $order['store_id'], $order['staff_id'], 0, $order['pay_type']);
// $sing[] = [
// 'uid' => $village_uid,
// 'order_id' => $order['order_id'],
// 'title' => '村长订单获得兑换券',
// 'store_id' => $order['store_id'],
// 'number' => $fees,
// 'financial_pm' => 1,
// 'user_ship' => 2,
// ];
// $sing[] = [
// 'uid' => $brigade_uid,
// 'order_id' => $order['order_id'],
// 'title' => '队长订单获得兑换券',
// 'store_id' => $order['store_id'],
// 'number' => $fees,
// 'financial_pm' => 1,
// 'user_ship' => 3,
// ];
// $sing[] = [
// 'uid' => $village_uid,
// 'order_id' => $order['order_id'],
// 'title' => '订单扣除兑换券',
// 'store_id' => $order['store_id'],
// 'number' => $fees,
// 'financial_pm' => 0,
// 'user_ship' => 2,
// ];
// $sing[] = [
// 'uid' => $brigade_uid,
// 'order_id' => $order['order_id'],
// 'title' => '订单扣除兑换券',
// 'store_id' => $order['store_id'],
// 'number' => $fees,
// 'financial_pm' => 0,
// 'user_ship' => 3,
// ];
if ($village_uid > 0) {
$financeLogic->other_arr['vip_uid'] = $village_uid;
}
$financeLogic->in($transaction_id, $fees, OrderEnum::VILLAGE_ORDER_OBTAINS, $order['store_id'], 0, 0, $order['pay_type']);
$financeLogic->out($transaction_id, $fees, OrderEnum::VILLAGE_ORDER_OBTAINS, $order['store_id'], $order['staff_id'], 0, $order['pay_type']);
//队长获得
// if ($brigade_uid > 0) {
// $financeLogic->other_arr['vip_uid'] = $brigade_uid;
// }
// $financeLogic->in($transaction_id, $fees, OrderEnum::BRIGADE_ORDER_OBTAINS, $order['store_id'], 0, 0, $order['pay_type']);
// $financeLogic->out($transaction_id, $fees, OrderEnum::BRIGADE_ORDER_OBTAINS, $order['store_id'], $order['staff_id'], 0, $order['pay_type']);
$user_sing->saveAll($sing);
if ($brigade_uid > 0) {
$financeLogic->other_arr['vip_uid'] = $brigade_uid;
}
$financeLogic->in($transaction_id, $fees, OrderEnum::BRIGADE_ORDER_OBTAINS, $order['store_id'], 0, 0, $order['pay_type']);
$financeLogic->out($transaction_id, $fees, OrderEnum::BRIGADE_ORDER_OBTAINS, $order['store_id'], $order['staff_id'], 0, $order['pay_type']);
// $user_sing->saveAll($sing);
//其他获得
$financeLogic->other_arr['vip_uid'] = 0;
$financeLogic->in($transaction_id, $fees, OrderEnum::OTHER_ORDER_OBTAINS, $order['store_id'], 0, 0, $order['pay_type']);