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

微信退款查询接口更改了,代码没有同步 #29

Closed
yyhSuper opened this issue Dec 29, 2016 · 20 comments
Closed

微信退款查询接口更改了,代码没有同步 #29

yyhSuper opened this issue Dec 29, 2016 · 20 comments
Assignees
Labels

Comments

@yyhSuper
Copy link

微信接口
image

weixin-sdk
Uploading image.png…

@borball borball self-assigned this Dec 29, 2016
@borball borball added the bug label Dec 29, 2016
borball pushed a commit that referenced this issue Dec 29, 2016
@yyhSuper
Copy link
Author

退款查询接口改了,对应的查询接口返回字段也有变更;com/riversoft/weixin/pay/payment/bean/RefundQuery.java 这个bean里面的字段跟现在微信接口返回的字段没有同步

@borball
Copy link
Owner

borball commented Dec 30, 2016

这个之前就没实现完整,里面有个todo,主要因为n是不固定的,要实现的话要像个好办法。

@borball
Copy link
Owner

borball commented Dec 30, 2016

@borball
Copy link
Owner

borball commented Dec 30, 2016

太复杂了,还两层结构:
退款代金券ID coupon_refund_id_$n_$m 否 String(20) 10000 退款代金券ID, $n为下标,$m为下标,从0开始编号
单个代金券退款金额 coupon_refund_fee_$n_$m 否 Int 100 单个退款代金券支付金额, $n为下标,$m为下标,从0开始编号

@borball
Copy link
Owner

borball commented Dec 30, 2016

真想吐槽下腾讯的技术水平。

@yyhSuper
Copy link
Author

我擦,这个接口的返回字段怎么这么恶心?字段名是动态的,。微信这么干是不是同一个订单如果有多次退款之后把这一个退款订单的结果集都返回来?如果这样返回一个数组不就行了?

@borball
Copy link
Owner

borball commented Dec 30, 2016

fixed, 你试试看。

@borball
Copy link
Owner

borball commented Dec 30, 2016

at ae300c5

@yyhSuper
Copy link
Author

属性名称定义冲突,重复了。
image

@yyhSuper
Copy link
Author

微信返回回来的xml协议里面加了应该还要在实体bean上面加上@JacksonXmlCData注解


<cash_fee></cash_fee>

@yyhSuper
Copy link
Author

<![CDATA[ ]]>

@borball
Copy link
Owner

borball commented Dec 30, 2016

@yyhSuper 有微信发过来的例子吗?我这边参考文档cash_fee 是int型。

borball pushed a commit that referenced this issue Dec 30, 2016
@yyhSuper
Copy link
Author

yyhSuper commented Dec 30, 2016

我跑了一下RefundQueryTest 测试用例里面的testXml2Bean方法是没有问题,现在代码里面序列化的对象是RefundQuery,但是你把序列化对象换成RefundQueryWrapper就会报错。

@yyhSuper
Copy link
Author

<xml> <appid><![CDATA[wxf8a8dcaa4xxxxxx]]></appid> <cash_fee><![CDATA[5100]]></cash_fee> <mch_id><![CDATA[121955741]]></mch_id> <nonce_str><![CDATA[V4Web1pKZ4Gml5vJ]]></nonce_str> <out_refund_no_0><![CDATA[ubD8q5aTyHW9qbDGCKDujhhjhj]]></out_refund_no_0> <out_trade_no><![CDATA[10002016122902486658894444]]></out_trade_no> <refund_channel_0><![CDATA[ORIGINAL]]></refund_channel_0> <refund_count>1</refund_count> <refund_fee>5100</refund_fee> <refund_fee_0>5100</refund_fee_0> <refund_id_0><![CDATA[200707200120161229012222555]]></refund_id_0> <refund_recv_accout_0><![CDATA[农业银行储蓄卡1875]]></refund_recv_accout_0> <refund_status_0><![CDATA[PROCESSING]]></refund_status_0> <result_code><![CDATA[SUCCESS]]></result_code> <return_code><![CDATA[SUCCESS]]></return_code> <return_msg><![CDATA[OK]]></return_msg> <sign><![CDATA[46100794564620ADA915E010DAFD66C0]]></sign> <total_fee><![CDATA[5100]]></total_fee> <transaction_id><![CDATA[4007072001201612295485656565]]></transaction_id> </xml>

@borball
Copy link
Owner

borball commented Dec 30, 2016

和CDATA无关,触发了一个Jackson的bug:FasterXML/jackson-databind#349

@borball
Copy link
Owner

borball commented Dec 30, 2016

估计要等Jackson的2.8.6 或者2.9.0 release出来才能搞定,不然的话代码会比较丑陋。

@borball
Copy link
Owner

borball commented Jan 16, 2017

Jackson 2.8.6 貌似没有完全修复这个问题:https://github.com/borball/jackson-test
2.9.0-SNAPSHOT测试可以通过,2.8.6测试失败。

borball pushed a commit that referenced this issue Jan 17, 2017
@borball
Copy link
Owner

borball commented Jan 17, 2017

@yyhSuper ,测试一下试试。

@yyhSuper
Copy link
Author

@borball 最近年底有点忙~

@yyhSuper
Copy link
Author

yyhSuper commented Feb 8, 2017

@borball 测试可以了

@borball borball closed this as completed Feb 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants