|
|
@@ -147,6 +147,32 @@ public class DevcloudServiceImpl implements DevcloudService {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public JSONObject deleteProject(Integer projectId) {
|
|
|
+ JSONObject result;
|
|
|
+ List<NameValuePair> params = new ArrayList<>();
|
|
|
+ params.add(new BasicNameValuePair("projectId", String.valueOf(projectId)));
|
|
|
+ try {
|
|
|
+ result = JSONObject.parseObject(
|
|
|
+ httpService.sendDelete(
|
|
|
+ devcloudUri + "/project",
|
|
|
+ params,
|
|
|
+ httpService.getToken()
|
|
|
+ )
|
|
|
+ );
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ if (result == null) {
|
|
|
+ throw CustomErrorException.devcloudError("deleteProject() = NULL!");
|
|
|
+ }
|
|
|
+ if (result.containsKey("code") && result.getInteger("code") == 200) {
|
|
|
+ return result;
|
|
|
+ } else {
|
|
|
+ throw CustomErrorException.devcloudError(result.toString());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public JSONObject addMember(Integer projectId, String phone) {
|
|
|
JSONObject result;
|