liyiorg / weixin-popular

微信SDK JAVA (公众平台、开放平台、 商户平台、 服务商平台)
Apache License 2.0
2.5k stars 1.06k forks source link

update #163

Closed Binary-ZeroOne closed 6 years ago

Binary-ZeroOne commented 6 years ago

给一些实体类增加public的空构造器,使其能够进行json序列化。改正微信支付API中下载对账单、下载资金账单以及下载代扣对账单的三处正则表达式,改正企业付款中的微信接口地址。给DownloadbillResult、PayDownloadfundflowResult、PapayContractbillResult,增加一个统一的接口,方便于外部进行判断。

liyiorg commented 6 years ago

@Binary-ZeroOne 下载对账单、下载资金账单以及下载代扣对账单的三处正则表达式。 这几个表达式的修改是因为API调用有问题吗? 修改后的表达式,如果返回的数据 两端有空格,表达式是不是就匹配不到了!

liyiorg commented 6 years ago

@Binary-ZeroOne 这三个表达式 换成

(?s)\\s*<xml>.*</xml>\\s*

是不是更好点。 我先合上这次提交的代码

Binary-ZeroOne commented 6 years ago

我刚刚按照你的表达式测试了一下,无法匹配。我把两端改为贪婪匹配就可以 .*<xml>(.*|\n)+</xml>.*

liyiorg commented 6 years ago

@Binary-ZeroOne 原来的表达式 调用失败是吗?

Binary-ZeroOne commented 6 years ago

是的,无法在失败的情况下匹配到微信返回的xml数据

liyiorg commented 6 years ago

@Binary-ZeroOne 你修改再push 一次吧,表达式 xml 外层要允许有空格。

Binary-ZeroOne commented 6 years ago

ok

liyiorg commented 6 years ago

@Binary-ZeroOne 表达式 (?s) 表式忽略换行,表达式中使用 \n , 不确定在linux 下会不会正常。有条件的话拉到 linux 环境下测试一把。

liyiorg commented 6 years ago

@Binary-ZeroOne ComponentAPI.componentlinkpage 字符串拼接使用 StringBuilder。方法名修改为 safeBindcomponent

Binary-ZeroOne commented 6 years ago

好的

Binary-ZeroOne commented 6 years ago

关于表达式中的\n,我在Linux服务器上跑了一下,能够正常匹配到。我之前写了一些BizwifiAPI的方法,一会我push上去,你看看符不符合规范