- 新增资产状态、订单来源、操作人类型、实名链接类型常量 - 8个模型新增字段(asset_status/generation/source/retail_price等) - 数据库迁移000082:7张表15+字段,含存量retail_price回填 - BUG-1修复:代理零售价渠道隔离,cost_price分配锁定 - BUG-2修复:一次性佣金仅客户端订单触发 - BUG-4修复:充值回调Store操作纳入事务 - 新增资产手动停用接口(PATCH /iot-cards/:id/deactivate、/devices/:id/deactivate) - Carrier管理新增实名链接配置 - 后台订单generation写时快照 - BatchUpdatePricing支持retail_price调价目标 - 清理全部H5旧接口和个人客户旧登录方法
39 lines
1.4 KiB
Go
39 lines
1.4 KiB
Go
package routes
|
|
|
|
import (
|
|
"github.com/gofiber/fiber/v2"
|
|
|
|
"github.com/break/junhong_cmp_fiber/internal/bootstrap"
|
|
apphandler "github.com/break/junhong_cmp_fiber/internal/handler/app"
|
|
"github.com/break/junhong_cmp_fiber/internal/middleware"
|
|
"github.com/break/junhong_cmp_fiber/pkg/openapi"
|
|
)
|
|
|
|
// RegisterPersonalCustomerRoutes 注册个人客户路由
|
|
// 路由挂载在 /api/c/v1 下
|
|
func RegisterPersonalCustomerRoutes(router fiber.Router, doc *openapi.Generator, basePath string, handlers *bootstrap.Handlers, personalAuthMiddleware *middleware.PersonalAuthMiddleware) {
|
|
// 需要认证的路由
|
|
authGroup := router.Group("")
|
|
authGroup.Use(personalAuthMiddleware.Authenticate())
|
|
|
|
// 获取个人资料
|
|
Register(authGroup, doc, basePath, "GET", "/profile", handlers.PersonalCustomer.GetProfile, RouteSpec{
|
|
Summary: "获取个人资料",
|
|
Description: "获取当前登录客户的个人资料",
|
|
Tags: []string{"个人客户 - 账户"},
|
|
Auth: true,
|
|
Input: nil,
|
|
Output: &apphandler.PersonalCustomerDTO{},
|
|
})
|
|
|
|
// 更新个人资料
|
|
Register(authGroup, doc, basePath, "PUT", "/profile", handlers.PersonalCustomer.UpdateProfile, RouteSpec{
|
|
Summary: "更新个人资料",
|
|
Description: "更新当前登录客户的昵称和头像",
|
|
Tags: []string{"个人客户 - 账户"},
|
|
Auth: true,
|
|
Input: &apphandler.UpdateProfileRequest{},
|
|
Output: nil,
|
|
})
|
|
}
|