From dbdd62ecd81e20a15b95f5a8a3ae2725f71adc80 Mon Sep 17 00:00:00 2001 From: lsinge <1947168518@qq.com> Date: Wed, 12 Mar 2025 19:37:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E7=94=9F=E6=88=90?= =?UTF-8?q?=E9=80=89=E9=A1=B9=E6=A0=91=E6=97=B6=EF=BC=8C=E4=BA=A7=E7=94=9F?= =?UTF-8?q?=E7=9A=84service=E4=BC=9A=E9=87=8D=E5=A4=8D=E5=BC=95=E5=85=A5mo?= =?UTF-8?q?del=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/resource/generate/default/curd/logic.go.template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/resource/generate/default/curd/logic.go.template b/server/resource/generate/default/curd/logic.go.template index 5fd823f..70c0419 100644 --- a/server/resource/generate/default/curd/logic.go.template +++ b/server/resource/generate/default/curd/logic.go.template @@ -31,7 +31,7 @@ import ( @{ if eq .options.Step.IsAddon true }isc "hotgo/internal/service"@{end} @{ if eq .options.Step.IsTreeTable true }"hotgo/utility/tree"@{end} @{ if eq .options.Step.HasFuncDict true }"hotgo/internal/library/dict"@{end} - @{ if eq .options.Step.HasFuncDict true }"hotgo/internal/model"@{end} + @{ if eq .options.Step.HasFuncDict true }hgModel "hotgo/internal/model"@{end} ) type s@{.servFunName} struct{} @@ -238,7 +238,7 @@ func (s *s@{.servFunName}) TreeOption(ctx context.Context) (nodes []tree.Node, e @{ if eq .options.Step.HasFuncDict true } // Option ่Žทๅ–@{.tableComment}้€‰้กน -func (s *s@{.servFunName}) Option(ctx context.Context) (opts []*model.Option, err error) { +func (s *s@{.servFunName}) Option(ctx context.Context) (opts []*hgModel.Option, err error) { var models []*entity.@{.daoName} if err = s.Model(ctx@{ if eq .options.Step.HasNotFilterAuth true } ,&handler.Option{FilterAuth: false}@{end}).Fields(dao.@{.daoName}.Columns().@{.options.FuncDict.Value.GoName},dao.@{.daoName}.Columns().@{.options.FuncDict.Label.GoName}). @{.listOrder}.Scan(&models); err != nil { @@ -246,10 +246,10 @@ func (s *s@{.servFunName}) Option(ctx context.Context) (opts []*model.Option, er return } - opts = make([]*model.Option, len(models)) + opts = make([]*hgModel.Option, len(models)) for k, v := range models { opts[k] = dict.GenHashOption(v.@{.options.FuncDict.Value.GoName}, gconv.String(v.@{.options.FuncDict.Label.GoName})) } return } -@{end} \ No newline at end of file +@{end}