Skip to content

账单下载相关接口有误 #3153

Closed
Closed
@hIxiIan

Description

@hIxiIan

提问前,请确保阅读过项目首页说明以及wiki开发文档相关内容,尤其是常见问题部分。完成内容后,请务必移除包括本句在内的无用内容,以免影响阅读,否则直接关闭,谢谢合作~

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

简要描述

请简单概括描述下你所遇到的问题。
申请资金账单下载链接报账单文件不存在,微信官方接口文档https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_2_7.shtml

模块版本情况

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

详细描述

尽量详细描述。请不要使用截图,尽量使用文字描述,代码直接贴上来,日志则请附在后面所示区域。

public WxPayApplyBillV3Result applyFundFlowBill(WxPayApplyFundFlowBillV3Request request) throws WxPayException {
        String url;
        if (StringUtils.isBlank(request.getTarType())) {
            url = String.format("%s/v3/bill/fundflowbill?bill_date=%s&bill_type=%s", this.getPayBaseUrl(), request.getBillDate(), request.getAccountType());
        } else {
            url = String.format("%s/v3/bill/fundflowbill?bill_date=%s&bill_type=%s&tar_type=%s", this.getPayBaseUrl(), request.getBillDate(), request.getAccountType(), request.getTarType());
        }
        String response = this.getV3(url);
        return (WxPayApplyBillV3Result)GSON.fromJson(response, WxPayApplyBillV3Result.class);
    }

官方接口文档请求地址账单类型参数为account_type,sdk内部链接写成了bill_type,导致获取不到账单

日志

如果日志不多,直接使用md代码引用格式贴在此处,否则如果太长,请将日志放在 pastebin 或者其他地方,然后将其url地址贴在这里

2023-10-25 10:53:43.099 ERROR   --- [           main] c.g.b.w.service.impl.WxPayServiceImpl    : 
【请求地址】:https://api.mch.weixin.qq.com/v3/bill/fundflowbill?bill_date=2023-10-18&bill_type=FEES&tar_type=GZIP
【异常信息】:请求的账单文件不存在
{"RetCode":"0000","RetMsg":"成功","Status":"SUCCESS","FileList":[]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions