Skip to content

feat(channel): 新增店铺链接管理接口和收藏管理接口#4029

Open
Copilot wants to merge 2 commits into
developfrom
copilot/feature-shop-and-favorite-management
Open

feat(channel): 新增店铺链接管理接口和收藏管理接口#4029
Copilot wants to merge 2 commits into
developfrom
copilot/feature-shop-and-favorite-management

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 31, 2026

WxChannelBasicService 缺少店铺链接相关接口,WxChannelFavoriteService 完全缺失。本次按照官方文档补全以上 4 个接口。

店铺管理(新增至 WxChannelBasicService

3 个新方法,响应 Bean 字段名与官方文档完全一致:

方法 接口路径 响应字段
getShopH5Url() /channels/ec/basics/shop/h5url/get shop_h5url
getShopQrCode(int qrcodeType) /channels/ec/basics/shop/qrcode/get shop_qrcode
getShopTagLink() /channels/ec/basics/shop/taglink/get shop_taglink

qrcodeType:官方文档要求必填枚举,1=二维码,2=标准物料,3=送礼物物料。

ShopH5UrlResponse h5 = channelService.getBasicService().getShopH5Url();
ShopQrCodeResponse qr = channelService.getBasicService().getShopQrCode(1);
ShopTagLinkResponse tag = channelService.getBasicService().getShopTagLink();

收藏管理(新增 WxChannelFavoriteService

新增独立服务,通过 channelService.getFavoriteService() 获取,懒加载初始化:

FavoriteCountResponse resp = channelService.getFavoriteService().getFavoriteCount();
resp.getFavorUvAccAll();           // 所有渠道总收藏人数
resp.getFavorUvAccShopHomepage();  // 店铺首页
resp.getFavorUvAccOrderDetail();   // 订单详情页
resp.getFavorUvAccProductDetail(); // 商品详情页
resp.getFavorUvAccOtherScene();    // 其他场景

新增文件

  • bean/shop/ShopH5UrlResponse, ShopQrCodeResponse, ShopTagLinkResponse
  • bean/favorite/FavoriteCountResponse
  • api/WxChannelFavoriteService + impl/WxChannelFavoriteServiceImpl
  • 对应单元测试:WxChannelShopLinkServiceImplTest, WxChannelFavoriteServiceImplTest

- 在 WxChannelApiUrlConstants 中新增店铺H5链接、二维码、口令及收藏管理接口 URL 常量
- 新增 ShopH5UrlResponse、ShopQrCodeResponse、ShopTagLinkResponse 响应 Bean 类
- 新增 FavoriteCountResponse 收藏人数响应 Bean 类(含 5 个渠道维度字段)
- WxChannelBasicService 新增 getShopH5Url()、getShopQrCode(int)、getShopTagLink() 方法
- WxChannelBasicServiceImpl 实现上述 3 个新方法
- 新增 WxChannelFavoriteService 接口及 WxChannelFavoriteServiceImpl 实现
- WxChannelService 新增 getFavoriteService() 方法
- BaseWxChannelServiceImpl 注册并懒加载 favoriteService
- 新增单元测试:WxChannelShopLinkServiceImplTest、WxChannelFavoriteServiceImplTest
Copilot AI changed the title [WIP] Add shop management and favorites management interfaces feat(channel): 新增店铺链接管理接口和收藏管理接口 May 31, 2026
Copilot AI requested a review from binarywang May 31, 2026 14:27
@binarywang binarywang marked this pull request as ready for review May 31, 2026 14:31
Copilot AI review requested due to automatic review settings May 31, 2026 14:31
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Copy Markdown

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 为视频号小店 SDK 补全店铺链接与收藏管理相关接口,扩展 WxChannelBasicService 并新增独立的 WxChannelFavoriteService,便于调用官方店铺 H5 链接、二维码、口令和收藏人数接口。

Changes:

  • 新增店铺 H5 链接、二维码、口令响应 Bean 与 BasicService 方法实现。
  • 新增收藏管理服务接口、实现、响应 Bean,并接入 WxChannelService 懒加载入口。
  • 增加对应 TestNG 测试类覆盖新增接口调用。

Reviewed changes

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

Show a summary per file
File Description
WxChannelShopLinkServiceImplTest.java 新增店铺链接相关接口测试
WxChannelFavoriteServiceImplTest.java 新增收藏人数接口测试
WxChannelApiUrlConstants.java 增加店铺链接与收藏管理 API 地址常量
ShopTagLinkResponse.java 新增店铺口令响应模型
ShopQrCodeResponse.java 新增店铺二维码响应模型
ShopH5UrlResponse.java 新增店铺 H5 链接响应模型
FavoriteCountResponse.java 新增收藏人数响应模型
WxChannelService.java 增加收藏管理服务访问入口
WxChannelFavoriteService.java 新增收藏管理服务接口
WxChannelBasicService.java 增加店铺链接管理方法声明
WxChannelFavoriteServiceImpl.java 新增收藏管理服务实现
WxChannelBasicServiceImpl.java 实现店铺链接管理接口
BaseWxChannelServiceImpl.java 增加收藏管理服务懒加载实现

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.

[Feature] 新增店铺管理和收藏管理接口

3 participants