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
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:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user