You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
638 B

package {{.pkgName}}
import (
{{.imports}}
// github.com/spf13/cast // 类型转换
// github.com/golang-module/carbon/v2 // 日期时间处理
// github.com/jinzhu/copier/v2 // 结构体复制
// orm 目录下的 orm 包
)
type {{.logic}} struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
{{if .hasDoc}}{{.doc}}{{end}}
func New{{.logic}}(ctx context.Context, svcCtx *svc.ServiceContext) *{{.logic}} {
return &{{.logic}}{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
}
}
func (l *{{.logic}}) {{.function}}({{.request}}) {{.responseType}} {
//
{{.returnString}}
}