Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 19, 2026

微工卡核身预下单(流程中完成授权)接口的请求类 PreOrderWithAuthRequest 缺少 authenticateType 字段,导致无法指定核身类型(普通核身/登录核身/保险核身/合同核身)。

修改内容

  • PreOrderWithAuthRequest.java

    • 新增 authenticateType 字段,支持四种核身类型枚举值:
      • NORMAL_AUTHENTICATE - 普通核身
      • LOGIN_AUTHENTICATE - 登录核身
      • INSURANCE_AUTHENTICATE - 保险核身
      • CONTRACT_AUTHENTICATE - 合同核身
  • PayrollServiceImplTest.java

    • 测试方法中添加新字段使用示例

使用示例

PreOrderWithAuthRequest request = new PreOrderWithAuthRequest();
request.setOpenid("onqOjjmo8wmTOOtSKwXtGjg9Gb58");
request.setSubMchid("1111111");
request.setAuthenticateType("NORMAL_AUTHENTICATE");  // 新增字段
// ... 其他字段设置

对应微信官方API文档:https://pay.weixin.qq.com/wiki/doc/apiv3_partner/Offline/apis/chapter4_1_1.shtml

Original prompt

This section details on the original issue you should resolve

<issue_title>PreOrderWithAuthRequest缺少一个authenticateType核身类型字段</issue_title>
<issue_description>原始需求来自:https://gitee.com/binary/weixin-java-tools/issues/IDJWCT

微工卡wxPayService.getPayrollService().payrollCardPreOrderWithAuth这个方法入参类PreOrderWithAuthRequest缺少一个authenticateType核身类型字段,这个官方接口也是有的,但这个方法的入参是没有这个字段的,核身类型一共有:普通核身\登录核身\保险核身\合同核身。</issue_description>

Comments on the Issue (you are @copilot in this section)

Custom agent used: 全部用中文
需要用中文,包括PR标题和分析总结过程


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add authenticateType field to PreOrderWithAuthRequest 为PreOrderWithAuthRequest添加authenticateType核身类型字段 Jan 19, 2026
Copilot AI requested a review from binarywang January 19, 2026 03:44
@binarywang binarywang marked this pull request as ready for review January 19, 2026 03:44
Copilot AI review requested due to automatic review settings January 19, 2026 03:44
@augmentcode
Copy link

augmentcode bot commented Jan 19, 2026

🤖 Augment PR Summary

总结:为微工卡“核身预下单(流程中完成授权)”请求类补齐缺失的 authenticateType 字段,以便调用方可指定核身业务类型。
变更:PreOrderWithAuthRequest 中新增 authenticate_type</code 序列化字段,并在 PayrollServiceImplTest 中补充对应的使用示例。

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

Copy link

Copilot AI left a 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 为微工卡核身预下单接口的 PreOrderWithAuthRequest 请求类添加了缺失的 authenticateType(核身类型)字段,以支持普通核身、登录核身、保险核身和合同核身四种业务类型,与微信官方 API 文档保持一致。

Changes:

  • PreOrderWithAuthRequest 类中新增 authenticateType 字段,包含完整的 Javadoc 文档和正确的序列化注解
  • 在测试类 PayrollServiceImplTest 中添加新字段的使用示例

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/marketing/payroll/PreOrderWithAuthRequest.java 添加 authenticateType 字段定义,包含完整的 Javadoc 文档说明四种核身类型枚举值,使用 @SerializedName 注解支持 JSON 序列化
weixin-java-pay/src/test/java/com/github/binarywang/wxpay/service/impl/PayrollServiceImplTest.java payrollCardPreOrderWithAuth 测试方法中添加 authenticateType 字段使用示例,设置为 "NORMAL_AUTHENTICATE"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PreOrderWithAuthRequest缺少一个authenticateType核身类型字段

2 participants