From 7293a7eb4d8763ac50fb63fbed442e8b97b85ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Mon, 26 Oct 2026 14:09:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=A7=AF=E5=88=86=E5=88=86=E6=9E=90):=20?= =?UTF-8?q?=E6=9D=A5=E6=BA=90/=E6=B6=88=E8=80=97=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E6=96=B0=E6=97=A7=20type=EF=BC=8C=E5=B9=B6=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E6=8A=BD=E5=A5=96=E6=8F=92=E4=BB=B6=E7=9B=B8=E5=85=B3=E6=89=87?= =?UTF-8?q?=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- .../integral/StorePointRecordServices.php | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/backend/app/services/activity/integral/StorePointRecordServices.php b/backend/app/services/activity/integral/StorePointRecordServices.php index b8947592d..d7c640cb5 100644 --- a/backend/app/services/activity/integral/StorePointRecordServices.php +++ b/backend/app/services/activity/integral/StorePointRecordServices.php @@ -211,15 +211,21 @@ class StorePointRecordServices extends BaseService } /** - * 订单来源 + * 积分来源分析(不含抽奖插件;赠送类兼容新旧落库 type) * @param $where * @return array */ public function getChannel($where) { - $bing_xdata = ['订单赠送', '商品赠送', '后台赠送', '签到获得', '九宫格抽奖']; - $color = ['#64a1f4', '#3edeb5', '#70869f', '#ffc653', '#fc7d6a']; - $data = ['gain', 'product_gain', 'system_add', 'sign', 'lottery_add']; + // billIntegralIncome 落库为 order_give_integral / pay_give_integral;旧 income 链路为 gain / product_gain + $bing_xdata = ['订单赠送', '商品赠送', '后台赠送', '签到获得']; + $color = ['#64a1f4', '#3edeb5', '#70869f', '#ffc653']; + $data = [ + ['gain', 'order_give_integral'], + ['product_gain', 'pay_give_integral'], + ['system_add'], + ['sign'], + ]; $bing_data = []; foreach ($data as $key => $item) { $bing_data[] = [ @@ -242,15 +248,20 @@ class StorePointRecordServices extends BaseService } /** - * 订单类型 + * 积分消耗分析(不含抽奖插件;退款收回兼容新旧落库 type) * @param $where * @return array */ public function getType($where) { - $bing_xdata = ['订单抵扣', '九宫格抽奖', '后台减少', '退款退回', '兑换商品']; - $color = ['#64a1f4', '#3edeb5', '#70869f', '#ffc653', '#fc7d6a']; - $data = ['deduction', 'lottery_use', 'system_sub', 'order_deduction', 'storeIntegral_use']; + $bing_xdata = ['订单抵扣', '后台减少', '退款退回', '兑换商品']; + $color = ['#64a1f4', '#70869f', '#ffc653', '#fc7d6a']; + $data = [ + ['deduction', 'product_deduction'], + ['system_sub'], + ['order_deduction', 'order_gain_refund', 'product_gain_refund'], + ['storeIntegral_use'], + ]; $bing_data = []; foreach ($data as $key => $item) { $bing_data[] = [