-
-
Notifications
You must be signed in to change notification settings - Fork 9k
补充微工卡批量转账API缺失字段 #3872
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
base: develop
Are you sure you want to change the base?
补充微工卡批量转账API缺失字段 #3872
Conversation
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
此 PR 补充了微工卡批量转账 API (PayrollTransferBatchesRequest) 中缺失的必要字段,以确保能够正确传递完整参数到微信支付 API。此修复基于 issue #3869 中用户报告的字段缺失问题。
Changes:
- 在
PayrollTransferBatchesRequest主类中新增三个字段:employmentType(用工类型,必填)、employmentScene(用工场景,可选)、authorizationType(授权类型,必填) - 在
TransferDetail内部类中新增userIdCard字段(收款用户身份证号,可选,需加密) - 更新测试用例以使用新增字段,确保 API 调用的完整性
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/marketing/payroll/PayrollTransferBatchesRequest.java | 新增三个必要的主类字段(employmentType、employmentScene、authorizationType)和一个 TransferDetail 内部类字段(userIdCard),所有字段都包含完整的 JavaDoc 注释和正确的注解 |
| weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/impl/PayrollServiceImplTest.java | 更新测试用例以使用新增的字段,确保 API 的完整测试覆盖 |
| * 字段名:用工类型 | ||
| * 变量名:employment_type | ||
| * 是否必填:是 | ||
| * 类型:string[1,32] |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
类型描述格式不一致。现有字段使用 string[1, 32](逗号后有空格),而新增的字段使用 string[1,32](逗号后无空格)。建议修改为 string[1, 32] 以保持代码库的一致性。
| * 字段名:用工场景 | ||
| * 变量名:employment_scene | ||
| * 是否必填:否 | ||
| * 类型:string[1,32] |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
类型描述格式不一致。现有字段使用 string[1, 32](逗号后有空格),而新增的字段使用 string[1,32](逗号后无空格)。建议修改为 string[1, 32] 以保持代码库的一致性。
| * 字段名:特约商户授权类型 | ||
| * 变量名:authorization_type | ||
| * 是否必填:是 | ||
| * 类型:string[1,32] |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
类型描述格式不一致。现有字段使用 string[1, 32](逗号后有空格),而新增的字段使用 string[1,32](逗号后无空格)。建议修改为 string[1, 32] 以保持代码库的一致性。
🤖 Augment PR SummarySummary: 本 PR 补全了微工卡批量转账(payroll-card/transfer-batches)请求体中缺失的关键入参字段,避免因参数不全导致微信支付侧校验失败。 Changes:
Technical Notes: 新增字段均按微信支付 API 参数命名进行 JSON 序列化;敏感字段通过 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| .transferRemark("2020年4月报销") | ||
| .openid("o-MYE42l80oelYMDE34nYD456Xoy") | ||
| .userName("张三") | ||
| .userIdCard("8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
微工卡批量转账API的
PayrollTransferBatchesRequest缺少必要字段,导致无法正确传递完整参数到微信支付API。新增字段
PayrollTransferBatchesRequest 主类:
employmentType(必填) - 用工类型:LONG_TERM_EMPLOYMENT, SHORT_TERM_EMPLOYMENT, COOPERATION_EMPLOYMENTemploymentScene(可选) - 用工场景:LOGISTICS, MANUFACTURING, HOTEL, CATERING, EVENT, RETAIL, OTHERSauthorizationType(必填) - 授权类型:INFORMATION_AUTHORIZATION_TYPE, FUND_AUTHORIZATION_TYPE, INFORMATION_AND_FUND_AUTHORIZATION_TYPETransferDetail 内部类:
userIdCard(可选, 加密) - 收款用户身份证号使用示例
所有敏感字段已使用
@SpecEncrypt注解标记,字段注释遵循项目规范格式。Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.