feat(miniapp): 新增 URL Link 二维码快速跳转规则管理服务#4040
Open
Copilot wants to merge 2 commits into
Open
Conversation
Copilot
AI
changed the title
[WIP] Add qrcode jump management methods to WxMpQrcodeService
feat(miniapp): 新增 URL Link 二维码快速跳转规则管理服务
Jun 1, 2026
There was a problem hiding this comment.
Pull request overview
本次 PR 为 weixin-java-miniapp 补齐小程序「URL Link 二维码快速跳转规则管理(wxaqrcodefast)」能力,新增独立服务入口、对应请求/响应模型、API URL 常量,并在主服务中挂载该能力,同时新增单元测试覆盖核心调用与序列化。
Changes:
- 新增
WxMaQrcodeJumpService及其实现WxMaQrcodeJumpServiceImpl,封装规则新增/查询/分页/删除接口调用。 - 在
WxMaService与BaseWxMaServiceImpl中集成并暴露getQrcodeJumpService()。 - 新增 URL 常量组
WxMaApiUrlConstants.QrcodeJump与相关数据模型、并增加对应单元测试。
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/WxMaQrcodeJumpService.java | 定义 URL Link 二维码快速跳转规则管理的服务接口 |
| weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/WxMaQrcodeJumpServiceImpl.java | 实现规则管理接口调用与响应解析 |
| weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/WxMaService.java | 主服务接口新增 getQrcodeJumpService() 入口 |
| weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/BaseWxMaServiceImpl.java | 基础实现挂载并返回 qrcodeJumpService 实例 |
| weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/constant/WxMaApiUrlConstants.java | 新增 QrcodeJump API URL 常量组 |
| weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/qrcode/WxMaQrcodeJumpRule.java | 新增跳转规则模型 |
| weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/qrcode/WxMaQrcodeJumpWxaItem.java | 新增测试/体验版可跳转小程序信息模型 |
| weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/qrcode/WxMaQrcodeJumpRuleListResponse.java | 新增规则列表响应承载模型 |
| weixin-java-miniapp/src/test/java/cn/binarywang/wx/miniapp/api/impl/WxMaQrcodeJumpServiceImplTest.java | 新增单元测试覆盖新增/查询/分页/删除与关键请求体序列化 |
Comment on lines
+3
to
+23
| import cn.binarywang.wx.miniapp.api.WxMaQrcodeJumpService; | ||
| import cn.binarywang.wx.miniapp.bean.qrcode.WxMaQrcodeJumpRule; | ||
| import cn.binarywang.wx.miniapp.bean.qrcode.WxMaQrcodeJumpRuleListResponse; | ||
| import com.google.gson.JsonObject; | ||
| import lombok.RequiredArgsConstructor; | ||
| import me.chanjar.weixin.common.error.WxErrorException; | ||
|
|
||
| import java.util.Collections; | ||
| import java.util.HashMap; | ||
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.QrcodeJump.*; | ||
| import static me.chanjar.weixin.common.util.json.WxGsonBuilder.create; | ||
|
|
||
| /** | ||
| * {@link WxMaQrcodeJumpService} 实现。 | ||
| */ | ||
| @RequiredArgsConstructor | ||
| public class WxMaQrcodeJumpServiceImpl implements WxMaQrcodeJumpService { | ||
| private final BaseWxMaServiceImpl wxMaService; |
Comment on lines
+26
to
+33
| private BaseWxMaServiceImpl wxMaService; | ||
| private WxMaQrcodeJumpService qrcodeJumpService; | ||
|
|
||
| @BeforeMethod | ||
| public void setUp() { | ||
| this.wxMaService = mock(BaseWxMaServiceImpl.class); | ||
| this.qrcodeJumpService = new WxMaQrcodeJumpServiceImpl(this.wxMaService); | ||
| } |
Comment on lines
+55
to
+56
| @SerializedName("is_expire") | ||
| private Boolean expire; |
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.
本次改动延续分支任务,补齐小程序 URL Link 二维码快速跳转规则管理能力。目标是将官方
wxaqrcodefast相关接口在 miniapp SDK 中完整落地,包含服务入口、请求/响应模型与调用实现。接口能力补齐(服务层)
WxMaQrcodeJumpService,提供:addRulegetRulesgetRuleListdeleteRuleWxMaQrcodeJumpServiceImpl,对接官方快速跳转规则管理接口。SDK 主服务集成
WxMaService增加getQrcodeJumpService()。BaseWxMaServiceImpl挂载qrcodeJumpService实例并暴露 getter,保持与现有 service 获取模式一致。API 常量与数据模型
WxMaApiUrlConstants增加QrcodeJump常量组:QRCODE_JUMP_ADDQRCODE_JUMP_GETQRCODE_JUMP_GET_LISTQRCODE_JUMP_DELETEWxMaQrcodeJumpRuleWxMaQrcodeJumpWxaItemWxMaQrcodeJumpRuleListResponse单元测试
WxMaQrcodeJumpServiceImplTest,覆盖: