All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 4m45s
- 新增单卡分配/回收 API(支持 ICCID 列表、号段范围、筛选条件三种选卡方式) - 新增资产分配记录查询 API(支持多条件筛选和分页) - 新增 AssetAllocationRecord 模型、Store、Service、Handler 完整实现 - 扩展 IotCardStore 新增批量更新、号段查询、筛选查询等方法 - 修复 GORM Callback 处理 slice 类型(BatchCreate)的问题 - 新增完整的单元测试和集成测试 - 同步 OpenSpec 规范并归档 change
50 lines
2.7 KiB
Go
50 lines
2.7 KiB
Go
package bootstrap
|
|
|
|
import (
|
|
"github.com/break/junhong_cmp_fiber/internal/store/postgres"
|
|
)
|
|
|
|
type stores struct {
|
|
Account *postgres.AccountStore
|
|
Shop *postgres.ShopStore
|
|
Role *postgres.RoleStore
|
|
Permission *postgres.PermissionStore
|
|
AccountRole *postgres.AccountRoleStore
|
|
RolePermission *postgres.RolePermissionStore
|
|
PersonalCustomer *postgres.PersonalCustomerStore
|
|
PersonalCustomerPhone *postgres.PersonalCustomerPhoneStore
|
|
Wallet *postgres.WalletStore
|
|
CommissionWithdrawalRequest *postgres.CommissionWithdrawalRequestStore
|
|
CommissionRecord *postgres.CommissionRecordStore
|
|
WalletTransaction *postgres.WalletTransactionStore
|
|
CommissionWithdrawalSetting *postgres.CommissionWithdrawalSettingStore
|
|
Enterprise *postgres.EnterpriseStore
|
|
EnterpriseCardAuthorization *postgres.EnterpriseCardAuthorizationStore
|
|
IotCard *postgres.IotCardStore
|
|
IotCardImportTask *postgres.IotCardImportTaskStore
|
|
AssetAllocationRecord *postgres.AssetAllocationRecordStore
|
|
}
|
|
|
|
func initStores(deps *Dependencies) *stores {
|
|
return &stores{
|
|
Account: postgres.NewAccountStore(deps.DB, deps.Redis),
|
|
Shop: postgres.NewShopStore(deps.DB, deps.Redis),
|
|
Role: postgres.NewRoleStore(deps.DB),
|
|
Permission: postgres.NewPermissionStore(deps.DB),
|
|
AccountRole: postgres.NewAccountRoleStore(deps.DB, deps.Redis),
|
|
RolePermission: postgres.NewRolePermissionStore(deps.DB, deps.Redis),
|
|
PersonalCustomer: postgres.NewPersonalCustomerStore(deps.DB, deps.Redis),
|
|
PersonalCustomerPhone: postgres.NewPersonalCustomerPhoneStore(deps.DB),
|
|
Wallet: postgres.NewWalletStore(deps.DB, deps.Redis),
|
|
CommissionWithdrawalRequest: postgres.NewCommissionWithdrawalRequestStore(deps.DB, deps.Redis),
|
|
CommissionRecord: postgres.NewCommissionRecordStore(deps.DB, deps.Redis),
|
|
WalletTransaction: postgres.NewWalletTransactionStore(deps.DB, deps.Redis),
|
|
CommissionWithdrawalSetting: postgres.NewCommissionWithdrawalSettingStore(deps.DB, deps.Redis),
|
|
Enterprise: postgres.NewEnterpriseStore(deps.DB, deps.Redis),
|
|
EnterpriseCardAuthorization: postgres.NewEnterpriseCardAuthorizationStore(deps.DB, deps.Redis),
|
|
IotCard: postgres.NewIotCardStore(deps.DB, deps.Redis),
|
|
IotCardImportTask: postgres.NewIotCardImportTaskStore(deps.DB, deps.Redis),
|
|
AssetAllocationRecord: postgres.NewAssetAllocationRecordStore(deps.DB, deps.Redis),
|
|
}
|
|
}
|