Przeglądaj źródła

getInfoById err return

yxh 4 lat temu
rodzic
commit
c2472e96e5
1 zmienionych plików z 1 dodań i 0 usunięć
  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"}}