38 lines
1.1 KiB
Go
38 lines
1.1 KiB
Go
|
// ==========================================================================
|
|||
|
// GFast自动生成service操作代码。
|
|||
|
// 生成日期:2024-04-12 10:38:43
|
|||
|
// 生成路径: internal/app/system/service/plant.go
|
|||
|
// 生成人:gfast
|
|||
|
// desc:电站信息
|
|||
|
// company:云南奇讯科技有限公司
|
|||
|
// ==========================================================================
|
|||
|
|
|||
|
package service
|
|||
|
|
|||
|
import (
|
|||
|
"context"
|
|||
|
"github.com/tiger1103/gfast/v3/api/v1/system"
|
|||
|
"github.com/tiger1103/gfast/v3/internal/app/system/model"
|
|||
|
)
|
|||
|
|
|||
|
type IPlant interface {
|
|||
|
List(ctx context.Context, req *system.PlantSearchReq) (res *system.PlantSearchRes, err error)
|
|||
|
GetById(ctx context.Context, Id string) (res *model.PlantInfoRes, err error)
|
|||
|
Add(ctx context.Context, req *system.PlantAddReq) (err error)
|
|||
|
Edit(ctx context.Context, req *system.PlantEditReq) (err error)
|
|||
|
Delete(ctx context.Context, Id []string) (err error)
|
|||
|
}
|
|||
|
|
|||
|
var localPlant IPlant
|
|||
|
|
|||
|
func Plant() IPlant {
|
|||
|
if localPlant == nil {
|
|||
|
panic("implement not found for interface IPlant, forgot register?")
|
|||
|
}
|
|||
|
return localPlant
|
|||
|
}
|
|||
|
|
|||
|
func RegisterPlant(i IPlant) {
|
|||
|
localPlant = i
|
|||
|
}
|