feat(publish-plan): add publish plan query and API routes

- Introduced `buildPublishPlanQuery` method in `DyVideoCron` model to create a base query for the publish plan module, filtering records based on user ID and project status.
- Added new API routes under `v1/publish-plan` for listing, starting, and stopping publish plans, requiring user authentication.
This commit is contained in:
nepiedg
2026-04-02 09:00:48 +00:00
parent c909ebdf88
commit 044586d60a
5 changed files with 896 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
use think\facade\Route;
use app\api\controller\v1\Auth;
use app\api\controller\v1\Platform;
/**
* 全局路由入口。
*
* 当前项目使用 ThinkPHP 8 的根级 `route/app.php` 自动加载机制。
* 之前把 API 路由写在 `app/api/route/app.php`,框架不会自动扫描该位置,
* 因此会导致 `api/v1/platform/accounts` 等接口返回 404。
*
* 这里统一把 API 路由注册到真正生效的位置。
*/
// v1 认证接口(公开)
Route::post('api/v1/auth/login', [Auth::class, 'login']);
Route::post('api/v1/auth/register', [Auth::class, 'register']);
Route::post('api/v1/auth/refresh', [Auth::class, 'refresh']);
// v1 认证接口(需登录)
Route::group('api/v1/auth', function () {
Route::get('me', [Auth::class, 'me']);
Route::post('logout', [Auth::class, 'logout']);
Route::post('password', [Auth::class, 'password']);
})->middleware(\app\api\middleware\Auth::class);
// v1 平台账号管理接口(需登录)
Route::group('api/v1/platform', function () {
Route::get('accounts', [Platform::class, 'accounts']);
})->middleware(\app\api\middleware\Auth::class);