提交
This commit is contained in:
22
modules/demo/service/demo_goods.go
Normal file
22
modules/demo/service/demo_goods.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"github.com/cool-team-official/cool-admin-go/cool"
|
||||
"github.com/cool-team-official/cool-admin-go/modules/demo/model"
|
||||
)
|
||||
|
||||
type DemoGoodsService struct {
|
||||
*cool.Service
|
||||
}
|
||||
|
||||
func NewDemoGoodsService() *DemoGoodsService {
|
||||
return &DemoGoodsService{
|
||||
&cool.Service{
|
||||
Model: model.NewDemoGoods(),
|
||||
ListQueryOp: &cool.QueryOp{
|
||||
|
||||
Join: []*cool.JoinOp{},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
18
modules/demo/service/demo_sample.go
Normal file
18
modules/demo/service/demo_sample.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"github.com/cool-team-official/cool-admin-go/cool"
|
||||
"github.com/cool-team-official/cool-admin-go/modules/demo/model"
|
||||
)
|
||||
|
||||
type DemoSampleService struct {
|
||||
*cool.Service
|
||||
}
|
||||
|
||||
func NewDemoSampleService() *DemoSampleService {
|
||||
return &DemoSampleService{
|
||||
&cool.Service{
|
||||
Model: model.NewDemoSample(),
|
||||
},
|
||||
}
|
||||
}
|
||||
21
modules/demo/service/demo_test.go
Normal file
21
modules/demo/service/demo_test.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"github.com/cool-team-official/cool-admin-go/cool"
|
||||
)
|
||||
|
||||
type DemoTestService struct {
|
||||
*cool.Service
|
||||
}
|
||||
|
||||
func NewDemoTestService() *DemoTestService {
|
||||
return &DemoTestService{
|
||||
&cool.Service{},
|
||||
}
|
||||
}
|
||||
|
||||
func (s *DemoTestService) GetDemoTestList() (interface{}, error) {
|
||||
// gsvc.SetRegistry(etcd.New(`127.0.0.1:2379`))
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
Reference in New Issue
Block a user