This commit is contained in:
36
modules/config/service/collect_plan.go
Normal file
36
modules/config/service/collect_plan.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"blazing/cool"
|
||||
"blazing/modules/config/model"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
type CollectPlanService struct {
|
||||
*cool.Service
|
||||
}
|
||||
|
||||
func NewCollectPlanService() *CollectPlanService {
|
||||
return &CollectPlanService{
|
||||
&cool.Service{
|
||||
Model: model.NewCollectPlanConfig(),
|
||||
ListQueryOp: &cool.QueryOp{
|
||||
FieldEQ: []string{"is_enable", "id"},
|
||||
AddOrderby: map[string]string{
|
||||
"id": "asc",
|
||||
},
|
||||
},
|
||||
PageQueryOp: &cool.QueryOp{
|
||||
FieldEQ: []string{"is_enable", "id"},
|
||||
KeyWordField: []string{"title", "description", "remark"},
|
||||
AddOrderby: map[string]string{
|
||||
"id": "asc",
|
||||
},
|
||||
ModifyResult: func(ctx g.Ctx, data interface{}) interface{} {
|
||||
return data
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user