1
0
mirror of synced 2026-03-25 22:32:26 +08:00

🎨 修复人事助手接口请求参数名错误:userids → userid

This commit is contained in:
Copilot
2026-03-06 12:32:54 +08:00
committed by GitHub
parent 26224372d2
commit d06da07be9

View File

@@ -41,13 +41,13 @@ public class WxCpHrServiceImpl implements WxCpHrService {
@Override @Override
public WxCpHrEmployeeFieldDataResp getEmployeeFieldInfo(List<String> userids, List<String> fields) throws WxErrorException { public WxCpHrEmployeeFieldDataResp getEmployeeFieldInfo(List<String> userids, List<String> fields) throws WxErrorException {
if (userids == null || userids.isEmpty()) { if (userids == null || userids.isEmpty()) {
throw new IllegalArgumentException("userids 不能为空"); throw new IllegalArgumentException("userid 不能为空");
} }
if (userids.size() > 20) { if (userids.size() > 20) {
throw new IllegalArgumentException("userids 每次最多传入20个"); throw new IllegalArgumentException("userid 每次最多传入20个");
} }
JsonObject jsonObject = new JsonObject(); JsonObject jsonObject = new JsonObject();
jsonObject.add("userids", WxCpGsonBuilder.create().toJsonTree(userids)); jsonObject.add("userid", WxCpGsonBuilder.create().toJsonTree(userids));
if (fields != null && !fields.isEmpty()) { if (fields != null && !fields.isEmpty()) {
jsonObject.add("fields", WxCpGsonBuilder.create().toJsonTree(fields)); jsonObject.add("fields", WxCpGsonBuilder.create().toJsonTree(fields));
} }