Explorar el Código

getInfoById err return

yxh hace 4 años
padre
commit
c2472e96e5
Se han modificado 1 ficheros con 1 adiciones y 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"}}