迁移 Flutter 端与训练脚本,模型/训练产物移出 git(遵循纯代码约定)

This commit is contained in:
2026-08-24 12:35:24 +08:00
parent d056f01965
commit 961523d94c
218 changed files with 13391 additions and 3232 deletions
+35
View File
@@ -0,0 +1,35 @@
package controller
import (
"context"
"observer-server/biz/model/dto"
"observer-server/biz/service"
)
// cAdmin 后台管理端接口:薄透传;service 按表归入各表文件
// (订单→service.Order、授权→service.License)。
// 独立 controller 聚合,避免同一 controller 挂客户端组 + 管理组时路由重复注册。
type cAdmin struct{}
var Admin = &cAdmin{}
// ListOrders 订单列表
func (c *cAdmin) ListOrders(ctx context.Context, req *dto.AdminOrderListReq) (*dto.AdminOrderListRes, error) {
return service.Order.AdminListOrders(ctx, req)
}
// ListLicenses 授权列表
func (c *cAdmin) ListLicenses(ctx context.Context, req *dto.AdminLicenseListReq) (*dto.AdminLicenseListRes, error) {
return service.License.AdminListLicenses(ctx, req)
}
// Grant 手动授权
func (c *cAdmin) Grant(ctx context.Context, req *dto.AdminGrantReq) (*dto.AdminGrantRes, error) {
return service.License.AdminGrant(ctx, req)
}
// Revoke 撤销授权
func (c *cAdmin) Revoke(ctx context.Context, req *dto.AdminRevokeReq) (*dto.AdminRevokeRes, error) {
return service.License.AdminRevoke(ctx, req)
}