增加产品列表接口
This commit is contained in:
19
product/internal/svc/servicecontext.go
Normal file
19
product/internal/svc/servicecontext.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package svc
|
||||
|
||||
import (
|
||||
"fusenapi/model"
|
||||
"fusenapi/product/internal/config"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
Config config.Config
|
||||
FsProductModel model.FsProductModel
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
FsProductModel: model.NewFsProductModel(sqlx.NewMysql(c.DataSource)),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user