Explorar o código

getInfoById err return

yxh %!s(int64=4) %!d(string=hai) anos
pai
achega
c2472e96e5
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      template/vm/go/service.template

+ 1 - 0
template/vm/go/service.template

@@ -177,6 +177,7 @@ func (s *{{$structName}}) GetInfoById(ctx context.Context,id {{$.table.PkColumn.
     }
     if data == nil || err != nil {
         err = gerror.New("获取信息失败")
+        return
     }
 	{{range $index, $column := .table.Columns}}
     {{if eq $column.HtmlType "images" "file" "files"}}