Merge pull request 'fix(app): 修复订单退款和库存处理相关问题' (#493) from dev into main
Reviewed-on: #493
This commit is contained in:
commit
8658df0d79
@ -628,6 +628,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($order['source'] != OrderEnum::SOURCE_20) {
|
||||||
if ($branchProduct) {
|
if ($branchProduct) {
|
||||||
$stock = bcsub($branchProduct['stock'], $v['cart_num'], 2);
|
$stock = bcsub($branchProduct['stock'], $v['cart_num'], 2);
|
||||||
StoreBranchProduct::update([
|
StoreBranchProduct::update([
|
||||||
@ -645,6 +646,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
SqlChannelLog('StoreBranchProduct', $branchProduct['id'], $v['cart_num'], -1, Request()->url());
|
SqlChannelLog('StoreBranchProduct', $branchProduct['id'], $v['cart_num'], -1, Request()->url());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
Log::error('订单库存更新失败:' . $e->getMessage());
|
Log::error('订单库存更新失败:' . $e->getMessage());
|
||||||
// 异常处理代码,例如记录日志或发送通知等。
|
// 异常处理代码,例如记录日志或发送通知等。
|
||||||
|
Loading…
x
Reference in New Issue
Block a user