|
@@ -28,11 +28,11 @@ public class WxCpDepartmentServiceImpl implements WxCpDepartmentService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public Integer create(WxCpDepart depart) throws WxErrorException { |
|
|
|
|
|
|
|
|
public Long create(WxCpDepart depart) throws WxErrorException { |
|
|
String url = "https://qyapi.weixin.qq.com/cgi-bin/department/create"; |
|
|
String url = "https://qyapi.weixin.qq.com/cgi-bin/department/create"; |
|
|
String responseContent = this.mainService.post(url, depart.toJson()); |
|
|
String responseContent = this.mainService.post(url, depart.toJson()); |
|
|
JsonElement tmpJsonElement = new JsonParser().parse(responseContent); |
|
|
JsonElement tmpJsonElement = new JsonParser().parse(responseContent); |
|
|
return GsonHelper.getAsInteger(tmpJsonElement.getAsJsonObject().get("id")); |
|
|
|
|
|
|
|
|
return GsonHelper.getAsLong(tmpJsonElement.getAsJsonObject().get("id")); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|