All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 5m16s
主要变更: - 新增 Carrier CRUD API(创建、列表、详情、更新、删除、状态更新) - IotCard/IotCardImportTask 添加 carrier_type/carrier_name 冗余字段 - 移除 Carrier 表的 channel_name/channel_code 字段 - 查询时直接使用冗余字段,避免 JOIN Carrier 表 - 添加数据库迁移脚本(000021-000023) - 添加单元测试和集成测试 - 同步更新 OpenAPI 文档和 specs
39 lines
2.1 KiB
Go
39 lines
2.1 KiB
Go
package bootstrap
|
|
|
|
import (
|
|
"github.com/break/junhong_cmp_fiber/internal/handler/admin"
|
|
"github.com/break/junhong_cmp_fiber/internal/handler/app"
|
|
"github.com/break/junhong_cmp_fiber/internal/handler/h5"
|
|
"github.com/go-playground/validator/v10"
|
|
)
|
|
|
|
func initHandlers(svc *services, deps *Dependencies) *Handlers {
|
|
validate := validator.New()
|
|
|
|
return &Handlers{
|
|
Account: admin.NewAccountHandler(svc.Account),
|
|
Role: admin.NewRoleHandler(svc.Role),
|
|
Permission: admin.NewPermissionHandler(svc.Permission),
|
|
PersonalCustomer: app.NewPersonalCustomerHandler(svc.PersonalCustomer, deps.Logger),
|
|
Shop: admin.NewShopHandler(svc.Shop),
|
|
ShopAccount: admin.NewShopAccountHandler(svc.ShopAccount),
|
|
AdminAuth: admin.NewAuthHandler(svc.Auth, validate),
|
|
H5Auth: h5.NewAuthHandler(svc.Auth, validate),
|
|
ShopCommission: admin.NewShopCommissionHandler(svc.ShopCommission),
|
|
CommissionWithdrawal: admin.NewCommissionWithdrawalHandler(svc.CommissionWithdrawal),
|
|
CommissionWithdrawalSetting: admin.NewCommissionWithdrawalSettingHandler(svc.CommissionWithdrawalSetting),
|
|
Enterprise: admin.NewEnterpriseHandler(svc.Enterprise),
|
|
EnterpriseCard: admin.NewEnterpriseCardHandler(svc.EnterpriseCard),
|
|
Authorization: admin.NewAuthorizationHandler(svc.Authorization),
|
|
CustomerAccount: admin.NewCustomerAccountHandler(svc.CustomerAccount),
|
|
MyCommission: admin.NewMyCommissionHandler(svc.MyCommission),
|
|
IotCard: admin.NewIotCardHandler(svc.IotCard),
|
|
IotCardImport: admin.NewIotCardImportHandler(svc.IotCardImport),
|
|
Device: admin.NewDeviceHandler(svc.Device),
|
|
DeviceImport: admin.NewDeviceImportHandler(svc.DeviceImport),
|
|
AssetAllocationRecord: admin.NewAssetAllocationRecordHandler(svc.AssetAllocationRecord),
|
|
Storage: admin.NewStorageHandler(deps.StorageService),
|
|
Carrier: admin.NewCarrierHandler(svc.Carrier),
|
|
}
|
|
}
|