feat(PayNotifyLogic): 更新支付通知逻辑,修复错误,优化代码
This commit is contained in:
parent
5ac2750227
commit
3723c9c047
@ -145,7 +145,6 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
OrderLogic::lessWriteOff($params);
|
OrderLogic::lessWriteOff($params);
|
||||||
}
|
}
|
||||||
self::dealProductLog($order);
|
self::dealProductLog($order);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -404,8 +403,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
$vipFen = $oldUser['purchase_funds'];
|
$vipFen = $oldUser['purchase_funds'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} elseif ($user['user_ship'] == 1 && $order['pay_type'] != PayEnum::CASH_PAY) {
|
||||||
elseif ($user['user_ship'] == 1 && $order['pay_type'] != PayEnum::CASH_PAY){
|
|
||||||
$vipFrozenAmount = self::dealFrozenPrice($order['id']);
|
$vipFrozenAmount = self::dealFrozenPrice($order['id']);
|
||||||
//为1的时候要去减活动价
|
//为1的时候要去减活动价
|
||||||
// $final_price = bcsub($order['pay_price'],$order['deduction_price'],2);
|
// $final_price = bcsub($order['pay_price'],$order['deduction_price'],2);
|
||||||
@ -557,12 +555,14 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
// 'user_ship' => 3,
|
// 'user_ship' => 3,
|
||||||
// ];
|
// ];
|
||||||
if ($village_uid > 0) {
|
if ($village_uid > 0) {
|
||||||
|
SystemStore::where('id', $village_uid)->inc('store_money', $fees)->update();
|
||||||
$financeLogic->other_arr['vip_uid'] = $village_uid;
|
$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->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']);
|
$financeLogic->out($transaction_id, $fees, OrderEnum::VILLAGE_ORDER_OBTAINS, $order['store_id'], $order['staff_id'], 0, $order['pay_type']);
|
||||||
//队长获得
|
//队长获得
|
||||||
if ($brigade_uid > 0) {
|
if ($brigade_uid > 0) {
|
||||||
|
SystemStore::where('id', $brigade_uid)->inc('store_money', $fees)->update();
|
||||||
$financeLogic->other_arr['vip_uid'] = $brigade_uid;
|
$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->in($transaction_id, $fees, OrderEnum::BRIGADE_ORDER_OBTAINS, $order['store_id'], 0, 0, $order['pay_type']);
|
||||||
@ -691,7 +691,6 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
(new StoreProductLog())->saveAll($productLog);
|
(new StoreProductLog())->saveAll($productLog);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -711,11 +710,9 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
'swap' => $StoreBranchProduct['swap'] - $v['cart_num'],
|
'swap' => $StoreBranchProduct['swap'] - $v['cart_num'],
|
||||||
'sales' => ['inc', $v['cart_num']]
|
'sales' => ['inc', $v['cart_num']]
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(new StoreBranchProduct())->saveAll($updateData);
|
(new StoreBranchProduct())->saveAll($updateData);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -743,13 +740,8 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
'stock' => $StoreBranchProduct['stock'] - $v['cart_num'],
|
'stock' => $StoreBranchProduct['stock'] - $v['cart_num'],
|
||||||
'sales' => ['inc', $v['cart_num']]
|
'sales' => ['inc', $v['cart_num']]
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(new StoreBranchProduct())->saveAll($updateData);
|
(new StoreBranchProduct())->saveAll($updateData);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user