1
0
mirror of synced 2025-12-25 20:17:56 +08:00

企业微信部门创建接口create返回值改为long类型

This commit is contained in:
Binary Wang
2018-12-26 16:24:30 +08:00
parent e7dd742923
commit 5af4059970
3 changed files with 4 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ public interface WxCpDepartmentService {
* @return 部门id
* @throws WxErrorException 异常
*/
Integer create(WxCpDepart depart) throws WxErrorException;
Long create(WxCpDepart depart) throws WxErrorException;
/**
* <pre>

View File

@@ -28,11 +28,11 @@ public class WxCpDepartmentServiceImpl implements WxCpDepartmentService {
}
@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 responseContent = this.mainService.post(url, depart.toJson());
JsonElement tmpJsonElement = new JsonParser().parse(responseContent);
return GsonHelper.getAsInteger(tmpJsonElement.getAsJsonObject().get("id"));
return GsonHelper.getAsLong(tmpJsonElement.getAsJsonObject().get("id"));
}
@Override