fix generate HasView

This commit is contained in:
maxbad
2023-05-07 22:57:34 +08:00
parent 67a0a38fd4
commit 788a9d4d2d
7 changed files with 8 additions and 8 deletions

View File

@@ -125,7 +125,7 @@ func (s *s@{.servFunName}) MaxSort(ctx context.Context, in @{.templateGroup}in.@
return
}
@{end}
@{ if eq .options.Step.HasView true }
@{ if or (eq .options.Step.HasView true) (eq .options.Step.HasEdit true) }
// View 获取@{.tableComment}指定信息
func (s *s@{.servFunName}) View(ctx context.Context, in @{.templateGroup}in.@{.varName}ViewInp) (res *@{.templateGroup}in.@{.varName}ViewModel, err error) {
err = s.Model(ctx).Where(dao.@{.daoName}.Columns().@{.pk.GoName}, in.@{.pk.GoName}).Scan(&res)