✨ Init
This commit is contained in:
7
resource/plug_template/service/enter.go.tpl
Normal file
7
resource/plug_template/service/enter.go.tpl
Normal file
@@ -0,0 +1,7 @@
|
||||
package service
|
||||
|
||||
type ServiceGroup struct {
|
||||
{{ .PlugName}}Service
|
||||
}
|
||||
|
||||
var ServiceGroupApp = new(ServiceGroup)
|
14
resource/plug_template/service/service.go.tpl
Normal file
14
resource/plug_template/service/service.go.tpl
Normal file
@@ -0,0 +1,14 @@
|
||||
package service
|
||||
|
||||
{{- if .NeedModel }}
|
||||
import (
|
||||
"miniapp/plugin/{{ .Snake}}/model"
|
||||
)
|
||||
{{ end }}
|
||||
|
||||
type {{ .PlugName}}Service struct{}
|
||||
|
||||
func (e *{{ .PlugName}}Service) PlugService({{- if .HasRequest }}req model.Request {{ end -}}) ({{- if .HasResponse }}res model.Response,{{ end -}} err error) {
|
||||
// 写你的业务逻辑
|
||||
return {{- if .HasResponse }} res,{{ end }} nil
|
||||
}
|
Reference in New Issue
Block a user