fix(fsgx): 修复5个未修复Bug — 积分解耦/定时任务/积分日志/团队统计/历史补偿

Bug3: 解耦积分奖励与佣金发放,报单订单只要推荐人存在即触发积分,
不再依赖 brokeragePrice > 0;grantFrozenPointsByBrokerage 移至
佣金判断之前独立执行。

Bug1: 定时任务手动触发返回真实结果 —— 补充 fsgx_release_frozen_points
到 taskName 映射;runNow() try/catch 后抛出异常;控制器捕获并返回
fail;修复 SystemTimer listener catch 块运算符优先级 bug。

Bug5: PointsReleaseServices 每日释放同步写入 eb_user_bill,使管理
后台积分日志页面可见;UserPointServices::pointRecord $status 数组
补充 hjf_frozen_direct/hjf_frozen_umbrella/frozen_points_release 等
fsgx 类型映射,防止未知类型报错。

Bug2: hjfMember.js getTeamData 改为 POST 与路由匹配;loadTeamData
字段映射 total/totalLevel/order_count → 界面展示字段。

Bug4: 新增 HjfPatchMissingRewards 命令(hjf:patch-rewards),支持
扫描全量/指定订单补发缺失积分奖励,支持 --dry-run 预览;注册命令
到 config/console.php。

Made-with: Cursor
This commit is contained in:
mac
2026-03-24 20:40:46 +08:00
parent a41e0ab0f7
commit 451918bc73
11 changed files with 180 additions and 23 deletions

View File

@@ -39,6 +39,11 @@ class UserPointServices extends BaseServices
'storeIntegral_use' => '积分兑换商品',
'pay_product_integral_back' => '返还下单使用积分',
'sign' => '签到获得积分',
'hjf_frozen_direct' => '直推积分奖励',
'hjf_frozen_umbrella' => '伞下积分奖励',
'frozen_points_brokerage' => '佣金奖励积分(待释放)',
'frozen_points_release' => '每日积分释放',
'holiday_gift_integral' => '节日有礼赠送积分',
];
[$page, $limit] = $this->getPageValue();
$list = $this->dao->getList($where, '*', $page, $limit);
@@ -59,9 +64,9 @@ class UserPointServices extends BaseServices
} elseif ($item['type'] == 'storeIntegral_use') {
$item['relation'] = $integralOrderServices->value(['id' => $item['link_id']], 'order_id');
} else {
$item['relation'] = $status[$item['type']];
$item['relation'] = $status[$item['type']] ?? $item['type'];
}
$item['type_name'] = $status[$item['type']];
$item['type_name'] = $status[$item['type']] ?? $item['type'];
}
$count = $this->dao->count($where);
return compact('list', 'count', 'status');