Files
huangjingfen/pro_v3.5.1/app/command/HjfReleasePoints.php
apple 76ccb24679 feat(fsgx): HJF queue merge, brokerage timing, cycle commission, points release
- Add HJF jobs, services, DAOs, models, admin/API controllers, release command
- Respect brokerage_timing (on_pay vs confirm); dispatch HjfOrderPayJob for queue goods
- Queue-only cycle commission and position index fix in StoreOrderCreateServices
- UserBill income types: frozen_points_brokerage, frozen_points_release
- Timer: fsgx_release_frozen_points -> PointsReleaseServices
- Agent tasks: no_assess filtering for direct/umbrella counts
- Migrations: queue_pool, points_release_log, fsgx_v1 checklist updates
- Admin/uniapp: crontab preset, membership level, user list, finance routes, docs

Made-with: Cursor
2026-03-24 11:59:09 +08:00

50 lines
1.3 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
declare(strict_types=1);
namespace app\command;
use app\services\hjf\PointsReleaseServices;
use think\console\Command;
use think\console\Input;
use think\console\Output;
/**
* 积分每日释放命令
*
* 用法:
* php think hjf:release-points
*
* 触发时机:
* - 每天凌晨 00:01 由 crontab 或 Swoole Timer 调用
* - P4-05 联调验证时手动执行
*
* Class HjfReleasePoints
* @package app\command
*/
class HjfReleasePoints extends Command
{
protected function configure(): void
{
$this->setName('hjf:release-points')
->setDescription('执行黄精粉健康商城每日积分释放frozen_points × 4‰ → available_points');
}
protected function execute(Input $input, Output $output): int
{
$output->writeln('[HjfReleasePoints] 开始执行积分释放...');
/** @var PointsReleaseServices $service */
$service = app()->make(PointsReleaseServices::class);
$result = $service->executeRelease();
$output->writeln(sprintf(
'[HjfReleasePoints] 完成:处理 %d 人,共释放 %d 积分,日期 %s',
$result['processed'],
$result['total_released'],
$result['release_date']
));
return 0;
}
}