fix(fsgx): 修复 type=8 订单不计算/不发放佣金的三个 Bug

Bug1: Pay.php::compute() 将 type=8 订单排除在佣金计算之外,导致
      is_queue_goods=1 的报单订单 one_brokerage 始终为 0。
      修复:is_queue_goods=1 时跳过 type 限制。

Bug2: backOrderBrokerage() 同样对 type=8 提前 return,即使
      one_brokerage 有值也不发放。修复同 Bug1。

Bug3: Pay::handle() 在 compute() 更新 DB 后,用陈旧的 $orderInfo
      (one_brokerage=0) 调用 backOrderBrokerage,导致发放金额为 0。
      修复:调用 backOrderBrokerage 前重新从 DB 读取最新订单数据。
Made-with: Cursor
This commit is contained in:
apple
2026-03-24 13:20:58 +08:00
parent 76ccb24679
commit f9ae632f33
2 changed files with 13 additions and 3 deletions

View File

@@ -240,8 +240,9 @@ class StoreOrderTakeServices extends BaseServices
//商城分销功能是否开启 0关闭1开启
if (!sys_config('brokerage_func_status')) return true;
// 营销产品不返佣金
if (!isset($orderInfo['type']) || in_array($orderInfo['type'], [4, 5, 7, 8])) {
// 营销产品不返佣金但报单商品is_queue_goods=1无论 type 均需参与返佣
$isQueueOrder = !empty($orderInfo['is_queue_goods']);
if (!$isQueueOrder && (!isset($orderInfo['type']) || in_array($orderInfo['type'], [4, 5, 7, 8]))) {
return true;
}
//绑定失效