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

服务商查询批量转账订单状态接口,指定DetailStatus时报错 #3023

Closed
wincham opened this issue May 20, 2023 · 0 comments · Fixed by #3027
Closed

服务商查询批量转账订单状态接口,指定DetailStatus时报错 #3023

wincham opened this issue May 20, 2023 · 0 comments · Fixed by #3027

Comments

@wincham
Copy link

wincham commented May 20, 2023

另外如果确认属于bug,而且已明确如何修复,请参考贡献指南直接提交PR,省的浪费时间在这里描述问题,非常感谢配合

简要描述

服务商查询批量转账订单接口,指定detailStatus字段时,报错

模块版本情况

  • WxJava 模块名: weixin-java-pay
  • WxJava 版本号: 4.5.0

详细描述

调用参数:
BatchNumberRequest batchNumberRequest = new BatchNumberRequest();
batchNumberRequest.setBatchId("xxx");
batchNumberRequest.setNeedQueryDetail(true);
batchNumberRequest.setOffset(0);
batchNumberRequest.setDetailStatus("ALL");

    BatchNumberResult batchNumberResult = wxPayService.getPartnerTransferService().queryBatchByBatchId(batchNumberRequest);

返回结果:
异常信息】:无法将输入源“/query/detail_status#2”映射到目标字段“明细状态”中,此字段并非多重字段但被输入源“/query/detail_status”映射过了。

源码bug部分:

PartnerTransferServiceImpl.queryBatchByBatchId(BatchNumberRequest request)
(line 84) String query = String.format("?need_query_detail=%s&detail_status=ALL&offset=%s&limit=%s",
request.getNeedQueryDetail(), request.getOffset(), request.getLimit());
if (StringUtil.isNotBlank(request.getDetailStatus())) {
query += "&detail_status=" + request.getDetailStatus();
}

query里面已经拼接了detail_status字段, 如果传入参数指定了状态,会再拼接一次,导致微信接口返回错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant