代码生成类型匹配

This commit is contained in:
yxh
2020-09-30 17:55:04 +08:00
parent e7b1cac928
commit c0e2e1efd9
3 changed files with 24 additions and 16 deletions
@@ -42,7 +42,10 @@ func SelectDbTableColumnsByName(tableName string) ([]*Entity, error) {
g.Log().Error(err)
return nil, gerror.New("查询列信息失败")
}
result.Structs(&entity)
err = result.Structs(&entity)
if err != nil {
return nil, err
}
return entity, nil
}