优化结构
This commit is contained in:
parent
63dbb4cfbc
commit
e65cf0b1d0
|
|
@ -11,9 +11,9 @@ import (
|
|||
|
||||
"kra/internal/conf"
|
||||
"kra/internal/logging"
|
||||
"kra/internal/service"
|
||||
"kra/internal/service/dto"
|
||||
"kra/internal/worker"
|
||||
"kra/internal/modules/system/dto"
|
||||
"kra/internal/modules/system/service"
|
||||
"kra/internal/modules/system/worker"
|
||||
|
||||
"github.com/go-kratos/kratos/v3"
|
||||
"github.com/go-kratos/kratos/v3/config"
|
||||
|
|
|
|||
|
|
@ -8,16 +8,16 @@ package main
|
|||
import (
|
||||
"log/slog"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/conf"
|
||||
"kra/internal/data"
|
||||
"kra/internal/initialize"
|
||||
"kra/internal/integration"
|
||||
"kra/internal/integration/cache"
|
||||
"kra/internal/logging"
|
||||
"kra/internal/server"
|
||||
"kra/internal/service"
|
||||
"kra/internal/worker"
|
||||
"kra/internal/modules/system/biz"
|
||||
"kra/internal/modules/system/data"
|
||||
"kra/internal/modules/system/initialize"
|
||||
"kra/internal/modules/system/integration"
|
||||
"kra/internal/modules/system/integration/cache"
|
||||
"kra/internal/modules/system/service"
|
||||
"kra/internal/modules/system/transport/server"
|
||||
"kra/internal/modules/system/worker"
|
||||
|
||||
"github.com/go-kratos/kratos/v3"
|
||||
"github.com/google/wire"
|
||||
|
|
|
|||
|
|
@ -8,20 +8,20 @@ package main
|
|||
|
||||
import (
|
||||
"github.com/go-kratos/kratos/v3"
|
||||
"kra/internal/biz"
|
||||
"kra/internal/conf"
|
||||
"kra/internal/data"
|
||||
"kra/internal/data/payment"
|
||||
"kra/internal/data/system"
|
||||
"kra/internal/initialize"
|
||||
"kra/internal/integration/cache"
|
||||
"kra/internal/integration/email"
|
||||
"kra/internal/integration/storage"
|
||||
"kra/internal/logging"
|
||||
"kra/internal/server"
|
||||
"kra/internal/server/handler"
|
||||
"kra/internal/service"
|
||||
"kra/internal/worker"
|
||||
"kra/internal/modules/system/biz"
|
||||
"kra/internal/modules/system/data"
|
||||
"kra/internal/modules/system/data/payment"
|
||||
"kra/internal/modules/system/data/repository"
|
||||
"kra/internal/modules/system/initialize"
|
||||
"kra/internal/modules/system/integration/cache"
|
||||
"kra/internal/modules/system/integration/email"
|
||||
"kra/internal/modules/system/integration/storage"
|
||||
"kra/internal/modules/system/service"
|
||||
"kra/internal/modules/system/transport/handler"
|
||||
"kra/internal/modules/system/transport/server"
|
||||
"kra/internal/modules/system/worker"
|
||||
"log/slog"
|
||||
)
|
||||
|
||||
|
|
|
|||
1
go.mod
1
go.mod
|
|
@ -14,7 +14,6 @@ require (
|
|||
github.com/fsnotify/fsnotify v1.10.1
|
||||
github.com/gin-gonic/gin v1.10.0
|
||||
github.com/glebarez/sqlite v1.11.0
|
||||
github.com/go-gormigrate/gormigrate/v2 v2.1.6
|
||||
github.com/go-kratos/kratos/contrib/otel/v3 v3.0.0-20260617100506-4e232a3eff59
|
||||
github.com/go-kratos/kratos/v3 v3.0.0
|
||||
github.com/go-pay/crypto v0.0.1
|
||||
|
|
|
|||
2
go.sum
2
go.sum
|
|
@ -126,8 +126,6 @@ github.com/glebarez/go-sqlite v1.21.2 h1:3a6LFC4sKahUunAmynQKLZceZCOzUthkRkEAl9g
|
|||
github.com/glebarez/go-sqlite v1.21.2/go.mod h1:sfxdZyhQjTM2Wry3gVYWaW072Ri1WMdWJi0k6+3382k=
|
||||
github.com/glebarez/sqlite v1.11.0 h1:wSG0irqzP6VurnMEpFGer5Li19RpIRi2qvQz++w0GMw=
|
||||
github.com/glebarez/sqlite v1.11.0/go.mod h1:h8/o8j5wiAsqSPoWELDUdJXhjAhsVliSn7bWZjOhrgQ=
|
||||
github.com/go-gormigrate/gormigrate/v2 v2.1.6 h1:VtX+l1Stj2v5RGubVQk0LS/8EPGXR+ldcOyCmlmKoyg=
|
||||
github.com/go-gormigrate/gormigrate/v2 v2.1.6/go.mod h1:PZpedQc4tWaxn6kvXicwhinh3L0seLpMc5ReKRX5id4=
|
||||
github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A=
|
||||
github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
|
||||
github.com/go-kratos/kratos/contrib/otel/v3 v3.0.0-20260617100506-4e232a3eff59 h1:FeDujUZF6a2pPS0RWGI52IXWPqVcGW1QP5vHDlAqLE8=
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
# Biz
|
||||
|
||||
本目录只包含领域对象、用例和仓储接口,不依赖 HTTP Handler、数据库驱动或对象存储 SDK。跨多表、必须原子完成的业务动作通过具有业务含义的仓储方法表达。
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
# Data Layer
|
||||
|
||||
`internal/data` is the persistence composition root. It owns the shared
|
||||
database/runtime container (`Data`), database clients, configuration storage,
|
||||
and the Wire `ProviderSet`. Business repositories live in submodules so a new
|
||||
feature can be found by its domain instead of by scanning one large package.
|
||||
|
||||
## Modules
|
||||
|
||||
- `internal/data/system` contains the built-in administration domain: users,
|
||||
authorities, APIs, permissions, menus, organization, dictionaries,
|
||||
parameters, tokens, security, audit/logging, media, announcements, tasks,
|
||||
versions, exports, bootstrap seeding, and system migrations.
|
||||
- `internal/data/payment` contains payment configuration and payment-order
|
||||
persistence. Provider SDK implementations are separate in
|
||||
`internal/integration/payment`.
|
||||
- `internal/data/migration` contains the version-table runner used by the
|
||||
root migration coordinator. It stays under data because it executes and
|
||||
records database schema steps.
|
||||
- `internal/adminsurface` contains the small menu/API metadata contract used
|
||||
when a business module contributes pages to the administration UI. It lives
|
||||
outside `data` because the contract itself is not persistence code.
|
||||
|
||||
The root package intentionally keeps only cross-cutting infrastructure:
|
||||
database lifecycle/reloads, runtime configuration persistence, data-scope
|
||||
auditing, integration configuration storage, and migration orchestration.
|
||||
Repositories depend on narrow module seams (`system.Provider` and
|
||||
`payment.Provider`) rather than importing the root implementation details.
|
||||
|
||||
First-install and configuration-management orchestration lives in
|
||||
`internal/initialize`. It implements `biz.InitializationRepo` through a narrow
|
||||
backend interface that `*data.Data` satisfies. This keeps administrator/menu/API
|
||||
seeding out of the database lifecycle package while retaining one migration
|
||||
entry point.
|
||||
|
||||
Non-database adapters remain under `internal/integration` (storage, email,
|
||||
payment SDKs, and cache). Their constructors are provided by
|
||||
`internal/integration.ProviderSet`, separate from the data provider set.
|
||||
GORM and pagination helpers live beside the data layer; stateless payment
|
||||
parsing lives in `internal/utils/paymentutil`; admin JWT handling lives in
|
||||
`internal/security/adminauth`.
|
||||
|
||||
## Migration and bootstrap
|
||||
|
||||
There is one migration execution entry point: `migrateAll` in the root data
|
||||
package. The root owns the shared integration-configuration table and appends
|
||||
the steps returned by `system.Migrations()` and `payment.Migrations()`.
|
||||
|
||||
Migrations create schemas and module-required fixed records only. Initial
|
||||
business data is separate: `initialize.Repo` invokes `system.SeedSystem` only
|
||||
from the explicit first-install flow to create the administrator, roles,
|
||||
menus, APIs, departments, policies, and module-provided administration
|
||||
surfaces.
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
// Package migration owns the application database migration runner. Each data
|
||||
// module declares its own steps; the root data package only orders and runs
|
||||
// them.
|
||||
package migration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-gormigrate/gormigrate/v2"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
const TableName = "sys_schema_migrations"
|
||||
|
||||
type Step struct {
|
||||
ID string
|
||||
Migrate func(*gorm.DB) error
|
||||
}
|
||||
|
||||
func Run(db *gorm.DB, steps []Step) error {
|
||||
if db == nil {
|
||||
return fmt.Errorf("database is nil")
|
||||
}
|
||||
migrations := make([]*gormigrate.Migration, 0, len(steps))
|
||||
for _, step := range steps {
|
||||
current := step
|
||||
migrations = append(migrations, &gormigrate.Migration{ID: current.ID, Migrate: current.Migrate})
|
||||
}
|
||||
manager := gormigrate.New(db, &gormigrate.Options{
|
||||
TableName: TableName,
|
||||
IDColumnName: "id",
|
||||
IDColumnSize: 255,
|
||||
UseTransaction: false,
|
||||
ValidateUnknownMigrations: true,
|
||||
}, migrations)
|
||||
if err := manager.Migrate(); err != nil {
|
||||
return fmt.Errorf("apply database migrations: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
# Initialization
|
||||
|
||||
`internal/initialize` owns application bootstrap orchestration. It implements
|
||||
`biz.InitializationRepo`, coordinates the explicit first-install workflow, and
|
||||
formats the compatible runtime configuration API.
|
||||
|
||||
The package depends on a narrow `Backend` interface. `*data.Data` implements
|
||||
that interface and remains responsible for opening, migrating, activating,
|
||||
reloading, and persisting database-backed runtime infrastructure.
|
||||
|
||||
The first-install order is:
|
||||
|
||||
1. `data` opens the candidate database.
|
||||
2. The single root migration runner applies infrastructure, system, and
|
||||
payment schema steps.
|
||||
3. `initialize` invokes `system.SeedSystem` for administrator, menu, API,
|
||||
department, policy, and module administration-surface records.
|
||||
4. `data` persists configuration and activates the candidate clients.
|
||||
|
||||
Schema migration and business seed data are deliberately separate. Normal
|
||||
startup and configuration reload may run migrations, but only the explicit
|
||||
first-install endpoint runs seed data.
|
||||
|
|
@ -89,7 +89,7 @@ func TestErrorEntryIncludesFinalApplicationSource(t *testing.T) {
|
|||
if err := os.WriteFile(filename, []byte(content), 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
entry := errorEntryFromZap(zapcore.Entry{Message: "task failed", Level: zapcore.ErrorLevel, Stack: "kra/internal/worker.execute\n" + filename + ":4"}, nil)
|
||||
entry := errorEntryFromZap(zapcore.Entry{Message: "task failed", Level: zapcore.ErrorLevel, Stack: "kra/internal/modules/system/worker.execute\n" + filename + ":4"}, nil)
|
||||
if !strings.Contains(entry.Info, "最终调用方法:"+filename+":4 (execute lines 3-5)") || !strings.Contains(entry.Info, "func execute()") {
|
||||
t.Fatalf("expected final caller source in error entry: %s", entry.Info)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
# Internal Modules
|
||||
|
||||
业务代码按模块组织在 `internal/modules/<name>` 下。每个模块可以拥有自己的
|
||||
`biz`、`data`、`service` 和 `transport`,模块之间通过接口和集成层协作。
|
||||
|
||||
## 当前模块
|
||||
|
||||
`system` 是模板自带的后台管理模块,包含用户、权限、菜单、API、公告、部门、
|
||||
字典、文件、审计、定时任务、支付和系统初始化等现有表与逻辑。
|
||||
|
||||
## 新增业务模块
|
||||
|
||||
新增业务请创建 `internal/modules/<business>`,不要把领域模型、仓储或 HTTP
|
||||
处理器继续添加到 `internal/biz`、`internal/data`、`internal/service` 等根目录。
|
||||
数据库表和迁移由业务模块自己的 `data` 包负责;只有数据库连接生命周期和通用
|
||||
迁移执行器属于 `internal/platform/database`。
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# System Module
|
||||
|
||||
系统模块承载当前管理后台的完整业务边界:
|
||||
|
||||
- `biz`:系统领域对象、用例和仓储接口
|
||||
- `data`:数据库生命周期、系统仓储、系统表和支付持久化
|
||||
- `service`:请求 DTO 与领域用例的转换
|
||||
- `transport`:Gin server、middleware、handler、router、HTTP 响应工具
|
||||
- `integration`:Redis、邮件、对象存储和支付渠道适配器
|
||||
- `initialize`:数据库首次初始化和系统种子数据编排
|
||||
- `worker`:定时任务执行与调度
|
||||
- `security`:后台 JWT 等安全实现
|
||||
- `utils`:只服务于系统模块的无状态工具
|
||||
|
||||
系统表统一使用 `sys_` 前缀;业务表应由新业务模块自行命名和迁移,不要混入
|
||||
本目录。
|
||||
|
|
@ -10,7 +10,7 @@ import (
|
|||
"strconv"
|
||||
|
||||
"kra/internal/conf"
|
||||
"kra/internal/integration/storage"
|
||||
"kra/internal/modules/system/integration/storage"
|
||||
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
|
@ -12,9 +12,9 @@ import (
|
|||
"github.com/redis/go-redis/v9"
|
||||
"gorm.io/gorm"
|
||||
"kra/internal/conf"
|
||||
datapayment "kra/internal/data/payment"
|
||||
datasystem "kra/internal/data/system"
|
||||
"kra/internal/integration/storage"
|
||||
datapayment "kra/internal/modules/system/data/payment"
|
||||
datasystem "kra/internal/modules/system/data/repository"
|
||||
"kra/internal/modules/system/integration/storage"
|
||||
)
|
||||
|
||||
var ProviderSet = wire.NewSet(
|
||||
|
|
@ -7,7 +7,7 @@ import (
|
|||
"reflect"
|
||||
"strings"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/modules/system/biz"
|
||||
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/clause"
|
||||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"errors"
|
||||
"testing"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/modules/system/biz"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
|
@ -20,7 +20,7 @@ import (
|
|||
"gorm.io/gorm/logger"
|
||||
"gorm.io/gorm/schema"
|
||||
"kra/internal/conf"
|
||||
"kra/internal/data/gormkit"
|
||||
"kra/internal/platform/database/gormkit"
|
||||
)
|
||||
|
||||
var databaseNamePattern = regexp.MustCompile(`^[A-Za-z][A-Za-z0-9_$-]*$`)
|
||||
|
|
@ -8,8 +8,8 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"kra/internal/data/gormkit"
|
||||
"kra/internal/logging"
|
||||
"kra/internal/platform/database/gormkit"
|
||||
|
||||
"gorm.io/gorm/logger"
|
||||
)
|
||||
|
|
@ -5,9 +5,9 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/conf"
|
||||
"kra/internal/integration/storage"
|
||||
"kra/internal/modules/system/biz"
|
||||
"kra/internal/modules/system/integration/storage"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"kra/internal/conf"
|
||||
"kra/internal/integration/storage"
|
||||
"kra/internal/modules/system/integration/storage"
|
||||
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package data
|
||||
|
||||
import (
|
||||
"kra/internal/data/migration"
|
||||
datapayment "kra/internal/data/payment"
|
||||
datasystem "kra/internal/data/system"
|
||||
datapayment "kra/internal/modules/system/data/payment"
|
||||
datasystem "kra/internal/modules/system/data/repository"
|
||||
"kra/internal/platform/database/migration"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
|
@ -14,7 +14,7 @@ func migrateAll(db *gorm.DB) error {
|
|||
steps := []migration.Step{{
|
||||
ID: "202608200001_data_infrastructure",
|
||||
Migrate: func(db *gorm.DB) error {
|
||||
return db.AutoMigrate(&integrationConfigPO{})
|
||||
return migration.CreateMissingTables(db, &integrationConfigPO{})
|
||||
},
|
||||
}}
|
||||
steps = append(steps, datasystem.Migrations()...)
|
||||
|
|
@ -3,7 +3,7 @@ package data
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"kra/internal/data/migration"
|
||||
"kra/internal/platform/database/migration"
|
||||
)
|
||||
|
||||
func TestMigrateAllRunsModuleSchemasWithoutBootstrapSeed(t *testing.T) {
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package payment
|
||||
|
||||
import (
|
||||
"kra/internal/adminsurface"
|
||||
"kra/internal/data/migration"
|
||||
"kra/internal/modules/system/adminsurface"
|
||||
"kra/internal/platform/database/migration"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
|
@ -10,7 +10,7 @@ import (
|
|||
func Migrations() []migration.Step {
|
||||
return []migration.Step{
|
||||
{ID: "202608200003_payment_schema", Migrate: func(db *gorm.DB) error {
|
||||
return db.AutoMigrate(&paymentOrderPO{})
|
||||
return migration.CreateMissingTables(db, &paymentOrderPO{})
|
||||
}},
|
||||
{ID: "202608200004_payment_defaults", Migrate: ensurePaymentIntegrationConfigs},
|
||||
}
|
||||
|
|
@ -11,8 +11,8 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"kra/internal/biz"
|
||||
datapayment "kra/internal/integration/payment"
|
||||
"kra/internal/modules/system/biz"
|
||||
datapayment "kra/internal/modules/system/integration/payment"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/modules/system/biz"
|
||||
)
|
||||
|
||||
func TestSavePaymentConfigRequiresDouyinAppIDWhenEnabled(t *testing.T) {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package payment
|
||||
|
||||
import "kra/internal/utils/paymentutil"
|
||||
import "kra/internal/modules/system/utils/paymentutil"
|
||||
|
||||
func text(values map[string]any, key string) string {
|
||||
value, _ := values[key].(string)
|
||||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/modules/system/biz"
|
||||
)
|
||||
|
||||
func TestMigrateSeedsPaymentProviders(t *testing.T) {
|
||||
|
|
@ -10,8 +10,8 @@ import (
|
|||
"github.com/google/uuid"
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/clause"
|
||||
"kra/internal/biz"
|
||||
"kra/internal/data/pagination"
|
||||
"kra/internal/modules/system/biz"
|
||||
"kra/internal/platform/database/pagination"
|
||||
)
|
||||
|
||||
type paymentOrderPO struct {
|
||||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/modules/system/biz"
|
||||
)
|
||||
|
||||
func newPaymentOrderRepoForTest(t *testing.T) *paymentOrderRepo {
|
||||
|
|
@ -5,9 +5,9 @@ import (
|
|||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/data/gormkit"
|
||||
"kra/internal/data/pagination"
|
||||
"kra/internal/modules/system/biz"
|
||||
"kra/internal/platform/database/gormkit"
|
||||
"kra/internal/platform/database/pagination"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"context"
|
||||
"testing"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/modules/system/biz"
|
||||
)
|
||||
|
||||
func TestAnnouncementRepositoryKeepsRawIDQuerySemantics(t *testing.T) {
|
||||
|
|
@ -6,8 +6,8 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/data/pagination"
|
||||
"kra/internal/modules/system/biz"
|
||||
"kra/internal/platform/database/pagination"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"errors"
|
||||
"strconv"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/modules/system/biz"
|
||||
|
||||
"github.com/casbin/casbin/v3"
|
||||
casbinmodel "github.com/casbin/casbin/v3/model"
|
||||
|
|
@ -5,8 +5,8 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/conf"
|
||||
"kra/internal/modules/system/biz"
|
||||
)
|
||||
|
||||
func newPolicyTestData(t *testing.T) *Data {
|
||||
|
|
@ -3,7 +3,7 @@ package system
|
|||
import (
|
||||
"context"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/modules/system/biz"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
|
@ -5,8 +5,8 @@ import (
|
|||
"errors"
|
||||
"time"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/data/pagination"
|
||||
"kra/internal/modules/system/biz"
|
||||
"kra/internal/platform/database/pagination"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package system
|
||||
|
||||
import "kra/internal/biz"
|
||||
import "kra/internal/modules/system/biz"
|
||||
|
||||
type auditQueryRepo struct{ data Provider }
|
||||
type auditRecorderRepo struct{ data Provider }
|
||||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/modules/system/biz"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
|
@ -5,8 +5,8 @@ import (
|
|||
"errors"
|
||||
"testing"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/conf"
|
||||
"kra/internal/modules/system/biz"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"time"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/data/pagination"
|
||||
"kra/internal/modules/system/biz"
|
||||
"kra/internal/platform/database/pagination"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
|
@ -7,7 +7,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/modules/system/biz"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
|
@ -7,8 +7,8 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/data/pagination"
|
||||
"kra/internal/modules/system/biz"
|
||||
"kra/internal/platform/database/pagination"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"context"
|
||||
"testing"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/modules/system/biz"
|
||||
)
|
||||
|
||||
func TestDictionaryListPreservesPreloadCollectionShapes(t *testing.T) {
|
||||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"time"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/data/pagination"
|
||||
"kra/internal/modules/system/biz"
|
||||
"kra/internal/platform/database/pagination"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"kra/internal/biz"
|
||||
"kra/internal/modules/system/biz"
|
||||
)
|
||||
|
||||
func errorString(value string) *string { return &value }
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue