tang05709 opened a new issue #1319:
URL: https://github.com/apache/dubbo-go/issues/1319
<!-- Please use this template while reporting a bug and provide as much info
as possible. Not doing so may result in your bug not being addressed in a
timely manner. Thanks!
-->
service:
type Category struct {
Id uint
Name string
ParentId uint
SeoTitle string
SeoKeywords string
SeoDescription string
Sort uint
Children []*Category
}
func (c *CategoryProvider) GetCategory(id uint) (*Category, error) {
res, err := service.NewCategoryService().FindById(id)
if err != nil {
return nil, err
}
fmt.Println(res.Name)
return &Category{
Id: res.Id,
Name: res.Name,
ParentId: res.ParentId,
SeoTitle: res.SeoTitle,
SeoDescription: res.SeoDescription,
Sort: res.Sort,
Children: nil,
}, nil
}
client:
type Category struct {
Id uint
Name string
ParentId uint
SeoTitle string
SeoKeywords string
SeoDescription string
Sort uint
Children []*Category
}
type CategoryProvider struct {
GetCategory func(id uint, rsp *Category) error
}
调用:
category := &consumer.Category{}
err := consumer.CategoryProvd.GetCategory(8, category)
**What happened**:
client 返回:
2021-07-15T10:10:26.622+0800 DEBUG dubbo/dubbo_invoker.go:164
result.Err: PackRequest(args:[8]): cat not get arg 0x8 type, result.Rest: <nil>
2021-07-15T10:10:26.622+0800 WARN proxy/proxy.go:214 result err: cat
not get arg 0x8 type
dubbo.apache.org/dubbo-go/v3/common/proxy.DefaultProxyImplementFunc.func1.1
/home/donald/work/gopro/pkg/mod/dubbo.apache.org/dubbo-go/[email protected]/common/proxy/proxy.go:214
main.main
/home/donald/work/gopro/src/besass/article_client/app/main.go:28
传入int64能返回预期的结果:
2021-07-15T10:25:45.060+0800 DEBUG dubbo/dubbo_invoker.go:164
result.Err: <nil>, result.Rest: &{8 testname8 0 testtitle8 testdescription8 2}
并且当我把ID和ParentId修改为int64,Sort仍然用uint,也会获取不到数据,返回
panic: maybe the client read timeout or fail to decode tcp stream in
Writer.Write,关于这一条我不确定是否同样的原因
**What you expected to happen**:
**How to reproduce it (as minimally and precisely as possible)**:
**Anything else we need to know?**:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]