Merged
Conversation
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add labor relation capability to mini program
feat: 实现小程序用工关系API支持
Dec 19, 2025
There was a problem hiding this comment.
Pull request overview
本PR为微信小程序SDK新增了用工关系API支持,实现了解绑用工关系和推送用工消息两个服务端接口。
- 新增两个请求Bean类(
WxMaUnbindEmployeeRequest和WxMaSendEmployeeMsgRequest)用于封装API请求参数 - 创建
WxMaEmployeeRelationService接口及其实现类,提供用工关系相关操作 - 在主服务类中注册新服务,使开发者可以通过
getEmployeeRelationService()获取服务实例
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| WxMaApiUrlConstants.java | 新增Employee接口常量,定义解绑和推送消息的API URL |
| WxMaUnbindEmployeeRequest.java | 解绑用工关系请求实体,包含openid和corpId字段 |
| WxMaSendEmployeeMsgRequest.java | 推送用工消息请求实体,包含openid、corpId和msg字段 |
| WxMaEmployeeRelationServiceImpl.java | 用工关系服务实现类,调用微信API完成解绑和推送操作 |
| BaseWxMaServiceImpl.java | 在主服务类中实例化并注册用工关系服务 |
| WxMaService.java | 在服务接口中新增getEmployeeRelationService()方法 |
| WxMaEmployeeRelationService.java | 用工关系服务接口,定义unbindEmployee和sendEmployeeMsg方法 |
Owner
Owner
|
auggie review |
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。
实现内容
新增Bean类
WxMaUnbindEmployeeRequest- 解绑请求(openid + corpId)WxMaSendEmployeeMsgRequest- 推送消息请求(openid + corpId + msg)新增服务
WxMaEmployeeRelationService- 用工关系服务接口unbindEmployee()- 解绑用工关系sendEmployeeMsg()- 推送用工消息WxMaEmployeeRelationServiceImpl- 服务实现API集成
WxMaApiUrlConstants.Employee- 新增API URL常量接口WxMaService.getEmployeeRelationService()- 服务获取方法BaseWxMaServiceImpl- 注册服务实例使用示例
参考文档
注:绑定和检查用工关系为小程序端API(
wx.bindEmployeeRelation/wx.checkEmployeeRelation),无需服务端实现。Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.