This commit is contained in:
Your Name
2026-08-06 10:57:35 +08:00
parent 2c0b9c5afa
commit 079e50006d
400 changed files with 3046 additions and 714 deletions
@@ -3893,6 +3893,18 @@ class YejiStatsLogic
}
}
/**
* 有效金额统计:在业绩履约状态口径上,再排除任何已发生退款(含部分退款)的订单。
*
* @param \think\db\BaseQuery|\think\Model $query
*/
public static function applyPrescriptionOrderEffectiveAmountQuery($query, string $tableAlias = ''): void
{
self::applyPrescriptionOrderNotCancelledForPerformanceQuery($query, $tableAlias);
$refundField = $tableAlias !== '' ? "{$tableAlias}.refund_amount" : 'refund_amount';
$query->whereRaw("({$refundField} IS NULL OR {$refundField} <= 0)");
}
/**
* @param \think\db\BaseQuery|\think\Model $query
*/