|
|
@ -1,5 +1,7 @@
|
|
|
|
package cn.teammodel.utils;
|
|
|
|
package cn.teammodel.utils;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.teammodel.common.ErrorCode;
|
|
|
|
|
|
|
|
import cn.teammodel.config.exception.ServiceException;
|
|
|
|
import cn.teammodel.model.dto.admin.common.GroupDto;
|
|
|
|
import cn.teammodel.model.dto.admin.common.GroupDto;
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
import com.fasterxml.jackson.databind.type.TypeFactory;
|
|
|
|
import com.fasterxml.jackson.databind.type.TypeFactory;
|
|
|
@ -72,10 +74,10 @@ public class GroupUtil {
|
|
|
|
int statusCode = response.getStatusLine().getStatusCode();
|
|
|
|
int statusCode = response.getStatusLine().getStatusCode();
|
|
|
|
if (statusCode != 200) throw new RuntimeException("Failed : HTTP error code : " + statusCode);
|
|
|
|
if (statusCode != 200) throw new RuntimeException("Failed : HTTP error code : " + statusCode);
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
throw new ServiceException(ErrorCode.SYSTEM_ERROR.getCode(), "数据解析异常");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
throw new ServiceException(ErrorCode.SYSTEM_ERROR.getCode(), "请求头异常");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return mapper;
|
|
|
|
return mapper;
|
|
|
|
}
|
|
|
|
}
|
|
|
|