feat(commission): 支持计奖商品参与设置、独立分成与多规格规则,完善团队中心与微信快捷登录
这个提交包含在:
@@ -249,6 +249,19 @@ class PayOper
|
||||
// 订单支付完成
|
||||
$user = User::where('id', $order->user_id)->find();
|
||||
if ($order_type == 'order') {
|
||||
// 兑换券同步核销(利用行锁即时扣减并标记,彻底消除异步队列延迟导致的并发双花漏洞)
|
||||
$ext = $order->ext;
|
||||
if (is_string($ext)) {
|
||||
$ext = json_decode($ext, true) ?: [];
|
||||
}
|
||||
if (!empty($ext['voucher_fee']) && empty($ext['voucher_consumed'])) {
|
||||
try {
|
||||
(new \addons\shopro\service\partner\VoucherService())->consumeByOrder($order);
|
||||
} catch (\Exception $e) {
|
||||
\think\Log::record('[PayOper.consumeByOrder] 兑换券同步核销异常: ' . $e->getMessage(), 'error');
|
||||
}
|
||||
}
|
||||
|
||||
if ($pay_mode == 'offline') {
|
||||
Action::add($order, null, auth_admin(), 'admin', '管理员操作自动货到付款支付成功');
|
||||
// 在控制器执行后续内容,这里不再处理
|
||||
|
||||
在新工单中引用
屏蔽一个用户