JM-WechatMini/resource/plug_template/service/service.go.tpl

15 lines
377 B
Smarty
Raw Normal View History

2023-11-02 04:34:46 +08:00
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
}