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
This commit is contained in:
60
pro_v3.5.1/app/controller/api/v1/hjf/QueueController.php
Normal file
60
pro_v3.5.1/app/controller/api/v1/hjf/QueueController.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\controller\api\v1\hjf;
|
||||
|
||||
use app\Request;
|
||||
use app\services\hjf\QueuePoolServices;
|
||||
use think\annotation\Inject;
|
||||
|
||||
/**
|
||||
* 用户端 · 公排接口
|
||||
*
|
||||
* GET /api/hjf/queue/status — 公排状态摘要
|
||||
* GET /api/hjf/queue/history — 公排历史记录(分页)
|
||||
*
|
||||
* Class QueueController
|
||||
* @package app\controller\api\v1\hjf
|
||||
*/
|
||||
class QueueController
|
||||
{
|
||||
#[Inject]
|
||||
protected QueuePoolServices $services;
|
||||
|
||||
/**
|
||||
* 公排状态摘要
|
||||
* 返回:全平台总单数、当前批次进度、用户自己的订单列表(含预估等待)
|
||||
*
|
||||
* @param Request $request
|
||||
* @return mixed
|
||||
*/
|
||||
public function status(Request $request): mixed
|
||||
{
|
||||
$uid = (int)$request->uid();
|
||||
return app('json')->success($this->services->getUserStatus($uid));
|
||||
}
|
||||
|
||||
/**
|
||||
* 公排历史记录(分页)
|
||||
*
|
||||
* @param Request $request
|
||||
* @return mixed
|
||||
*/
|
||||
public function history(Request $request): mixed
|
||||
{
|
||||
$uid = (int)$request->uid();
|
||||
$status = (int)$request->param('status', -1); // -1=全部, 0=排队中, 1=已退款
|
||||
[$page, $limit] = $this->getPage($request);
|
||||
|
||||
return app('json')->success(
|
||||
$this->services->getUserHistory($uid, $status, $page, $limit)
|
||||
);
|
||||
}
|
||||
|
||||
private function getPage(Request $request): array
|
||||
{
|
||||
$page = max(1, (int)$request->param('page', 1));
|
||||
$limit = min(50, max(1, (int)$request->param('limit', 15)));
|
||||
return [$page, $limit];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user