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:
@@ -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;
|
||||
}
|
||||
//绑定失效
|
||||
|
||||
Reference in New Issue
Block a user