Skip to content

feat(open): 添加获取类目名称信息 API (getAllCategoryName) - #3769

Merged
binarywang merged 3 commits into
developfrom
copilot/add-mini-program-category-management
Nov 27, 2025
Merged

feat(open): 添加获取类目名称信息 API (getAllCategoryName)#3769
binarywang merged 3 commits into
developfrom
copilot/add-mini-program-category-management

Conversation

CopilotAI commented Nov 27, 2025

Copy link
Copy Markdown
Contributor

Issue #3461 请求添加 7 个小程序类目管理 API。经核查,6 个已存在,仅缺少"获取类目名称信息"接口。

变更内容

  • 新增响应类WxOpenMaCategoryNameListResult - 包含类目 ID 和名称的列表结构
  • 接口扩展WxOpenMaBasicService.getAllCategoryName() - 调用 /cgi-bin/wxopen/getallcategoryname
  • 实现WxOpenMaBasicServiceImpl 及废弃类 WxOpenFastMaServiceImpl 中的对应方法

使用示例

WxOpenMaServicemaService = openService.getWxOpenComponentService()
.getWxMaServiceByAppid(appId);
WxOpenMaCategoryNameListResultresult = maService.getBasicService().getAllCategoryName();
for (CategoryNamecategory : result.getCategoryNameList()) {
// firstId, firstName, secondId, secondName
}

已存在的 API(无需添加)

方法端点
getAllCategories获取可设置的所有类目
getSettingCategories获取已设置的所有类目
getAllCategoriesByType获取不同类型主体可设置的类目
addCategory添加类目
deleteCategory删除类目
modifyCategory修改类目资质信息
Original prompt

This section details on the original issue you should resolve

<issue_title>第三方平台缺失代商家管理小程序 /小程序类目管理</issue_title>
<issue_description># 提问前,请确保阅读过项目首页说明以及wiki开发文档相关内容,完成内容后,请务必移除包括本句在内的无用内容,以免影响他人阅读,否则直接关闭,谢谢合作~

简要描述

第三方平台缺失代商家管理小程序 /小程序类目管理
目前只有获取授权小程序帐号的可选类目,

官方文档地址

获取可设置的所有类目
获取已设置的所有类目
获取不同类型主体可设置的类目
添加类目
删除类目
修改类目资质信息
获取类目名称信息
https://developers.weixin.qq.com/doc/oplatform/openApi/miniprogram-management/category-management/api_getallcategories.html
</issue_description>

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


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

CopilotAIand others added 2 commits November 27, 2025 12:58
- 添加 WxOpenMaCategoryNameListResult 响应结果类
- 在 WxOpenMaBasicService 接口中添加 getAllCategoryName() 方法
- 在 WxOpenMaBasicServiceImpl 实现类中实现该方法
- 在废弃的 WxOpenFastMaServiceImpl 中保持接口一致性
API: https://api.weixin.qq.com/cgi-bin/wxopen/getallcategorynamelist
文档: https://developers.weixin.qq.com/doc/oplatform/openApi/miniprogram-management/category-management/api_getallcategoryname.html
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
CopilotAI changed the title [WIP] Add third-party mini program category managementfeat(open): 添加获取类目名称信息 API (getAllCategoryName)Nov 27, 2025
CopilotAI requested a review from binarywangNovember 27, 2025 13:02
@binarywang
binarywang marked this pull request as ready for review November 27, 2025 15:04
@binarywang
binarywang merged commit 21d5f2f into developNov 27, 2025
1 check passed
@binarywang
binarywang deleted the copilot/add-mini-program-category-management branch November 27, 2025 15:06
@binarywangbinarywang added this to the 4.7.9 milestone Nov 28, 2025
Sign up for freeto 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.

第三方平台缺失代商家管理小程序 /小程序类目管理

2 participants

@binarywang