``refactor(pet): 重构宠物服务结构,将PetService独立封装并继承cool.Service``
This commit is contained in:
@@ -22,6 +22,7 @@ type IService interface {
|
||||
GetModel() IModel // 获取model
|
||||
}
|
||||
type Service struct {
|
||||
Models *gdb.Model
|
||||
Model IModel
|
||||
ListQueryOp *QueryOp
|
||||
PageQueryOp *QueryOp
|
||||
@@ -420,8 +421,8 @@ func (s *Service) ModifyAfter(ctx context.Context, method string, param g.MapStr
|
||||
func (s *Service) GetModel() IModel {
|
||||
return s.Model
|
||||
}
|
||||
// GetModel 获取model
|
||||
|
||||
// GetModel 获取model
|
||||
|
||||
// NewService 新建一个service
|
||||
func NewService(model IModel) *Service {
|
||||
|
||||
Reference in New Issue
Block a user