Merged
Conversation
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add missing fields to PayrollTransferBatchesRequest
补充微工卡批量转账API缺失字段
Jan 26, 2026
There was a problem hiding this comment.
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 的完整测试覆盖 |
...n/java/com/github/binarywang/wxpay/bean/marketing/payroll/PayrollTransferBatchesRequest.java
Outdated
Show resolved
Hide resolved
| * 字段名:用工场景 | ||
| * 变量名:employment_scene | ||
| * 是否必填:否 | ||
| * 类型:string[1,32] |
...n/java/com/github/binarywang/wxpay/bean/marketing/payroll/PayrollTransferBatchesRequest.java
Outdated
Show resolved
Hide resolved
🤖 Augment PR SummarySummary: 本 PR 补全了微工卡批量转账(payroll-card/transfer-batches)请求体中缺失的关键入参字段,避免因参数不全导致微信支付侧校验失败。 Changes:
Technical Notes: 新增字段均按微信支付 API 参数命名进行 JSON 序列化;敏感字段通过 🤖 Was this summary useful? React with 👍 or 👎 |
Owner
|
@copilot apply changes based on the comments in this thread |
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Contributor
Author
已根据评审意见修正所有类型格式,统一为 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✅ 补充微工卡批量转账API缺失字段
完成清单
PayrollTransferBatchesRequest类中添加employmentType、employmentScene、authorizationType字段TransferDetail内部类中添加userIdCard字段string[1, 32](逗号后加空格)修改摘要
本次修改为微工卡批量转账API请求类
PayrollTransferBatchesRequest补充了4个缺失字段:新增字段:
质量保证:
string[1, 32]保持代码库一致性修改文件:
PayrollTransferBatchesRequest.java- 新增70行代码PayrollServiceImplTest.java- 新增4行测试代码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.