Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: dubbogo 中如何使用 bigdecimal [ok for usage] #109

Closed
echoiron opened this issue Jun 29, 2019 · 4 comments · Fixed by #126
Closed

Feature: dubbogo 中如何使用 bigdecimal [ok for usage] #109

echoiron opened this issue Jun 29, 2019 · 4 comments · Fixed by #126
Labels
enhancement New feature or request

Comments

@echoiron
Copy link

echoiron commented Jun 29, 2019

项目对接时将bigdecimal改为string成功接收(证明不是连接问题)

  1. 改回bigdecimal后使用golang中的float64测试报错

  2. 然后再此时下方包中的Decimal,已经不能接收BigDecimal类型
    import "github.com/shopspring/decimal"

  3. 尝试使用golang中的big类型同样失败

BigDecimal在Java中是常用的精确计算包装类,实际业务不可能改为浮点类型,所以该问题依旧是需要解决的问题

@echoiron
Copy link
Author

echoiron commented Jun 29, 2019

测试中迎来好消息,饶了一大圈后发现使用string类型居然可以接收的BigDecimal

ava BigDecimal 对应 Golang string 测通
测试发现该还是有问题,string不能接收BigDecimal

@wongoo
Copy link
Contributor

wongoo commented Jul 1, 2019

@Pepigo we will check and test it asap.

@echoiron
Copy link
Author

echoiron commented Jul 1, 2019

感谢,希望尽快有解决方案

@echoiron
Copy link
Author

经测试,最新版的dubbogo可以成功接收BigDecimal类型

image

3

bigdecimal

bigdecimal2

@AlexStocks AlexStocks reopened this Jul 18, 2019
@AlexStocks AlexStocks changed the title bigdecimal与golang中类型对应关系问题? Feature: dubbogo 中如何使用 bigdecimal Jul 18, 2019
@AlexStocks AlexStocks added the enhancement New feature or request label Jul 18, 2019
@AlexStocks AlexStocks changed the title Feature: dubbogo 中如何使用 bigdecimal Feature: dubbogo 中如何使用 bigdecimal [ok for usage] Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants