fix: sale create fields
CI / changes (push) Successful in 14s
CI / docker-bff (push) Successful in 3s
CI / docker-product (push) Successful in 24s
CI / docker-admin (push) Has been skipped
CI / docker-user (push) Has been skipped
CI / docker-ad (push) Has been skipped
CI / docker-chore (push) Successful in 25s
CI / docker-express (push) Has been skipped
CI / docker-sale (push) Successful in 26s

This commit is contained in:
zzw
2026-08-28 15:35:33 +08:00
parent 914a11d05a
commit 53d203ee14
20 changed files with 542 additions and 251 deletions
+14 -6
View File
@@ -4,19 +4,27 @@ import (
"lone-services/pkg/utils"
"lone-services/services/sale/internal/config"
"github.com/zeromicro/go-zero/core/logx"
"gorm.io/gorm"
)
type ServiceContext struct {
Config config.Config
DB *gorm.DB
Prefix string
Config config.Config
DB *gorm.DB
Prefix string
ChoreSvcName string
}
func NewServiceContext(c config.Config, db *gorm.DB) *ServiceContext {
choreSvc := utils.GetConfigString("services.chore")
if choreSvc == utils.StringEmpty {
logx.Error("config services.chore empty")
}
return &ServiceContext{
Config: c,
DB: db,
Prefix: utils.GetConfigString("mysql.prefix"),
Config: c,
DB: db,
Prefix: utils.GetConfigString("mysql.prefix"),
ChoreSvcName: choreSvc,
}
}