Skip to content

weixin-java-cp WxCpUserServiceImpl 删除用户的接口有问题 #268

@axiu90

Description

@axiu90

单个用户删除之后,还会再发一遍批量删除的请求
@OverRide
public void delete(String... userIds) throws WxErrorException {
if (userIds.length == 1) {
this.deleteOne(userIds[0]);
}

String url = "https://qyapi.weixin.qq.com/cgi-bin/user/batchdelete";
JsonObject jsonObject = new JsonObject();
JsonArray jsonArray = new JsonArray();
for (String userid : userIds) {
  jsonArray.add(new JsonPrimitive(userid));
}
jsonObject.add("useridlist", jsonArray);
this.mainService.post(url, jsonObject.toString());

}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions