瀏覽代碼

#268 修复WxCpUserServiceImpl删除用户的接口问题

master
Binary Wang 7 年之前
父節點
當前提交
8dc2b4d0af
共有 1 個檔案被更改,包括 3 行新增6 行删除
  1. +3
    -6
      weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpUserServiceImpl.java

+ 3
- 6
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpUserServiceImpl.java 查看文件

@@ -42,15 +42,12 @@ public class WxCpUserServiceImpl implements WxCpUserService {
this.mainService.post(url, user.toJson());
}

public void deleteOne(String userId) throws WxErrorException {
String url = "https://qyapi.weixin.qq.com/cgi-bin/user/delete?userid=" + userId;
this.mainService.get(url, null);
}

@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/delete?userid=" + userIds[0];
this.mainService.get(url, null);
return;
}

String url = "https://qyapi.weixin.qq.com/cgi-bin/user/batchdelete";


Loading…
取消
儲存