| | |
| | | * |
| | | * @param cloudCallBeak - |
| | | */ |
| | | public void getUserRightType(CloudCallBeak<PageNumberObject<UserRightTypeBean>> cloudCallBeak) { |
| | | public void getUserRightType(CloudCallBeak<UserRightTypeBean> cloudCallBeak) { |
| | | String requestUrl = HttpApi.B_POST_GET_USERRIGHTTYPE; |
| | | JsonObject json = new JsonObject(); |
| | | HttpClient.getInstance().requestHttp(requestUrl, json.toString(), new CloudCallBeak<String>() { |
| | |
| | | public void onSuccess(String jsonStr) { |
| | | if (TextUtils.isEmpty(jsonStr)) { |
| | | if (cloudCallBeak != null) { |
| | | cloudCallBeak.onSuccess(new PageNumberObject<>()); |
| | | cloudCallBeak.onSuccess(new UserRightTypeBean()); |
| | | } |
| | | } |
| | | Gson gson = new Gson(); |
| | | Type type = new TypeToken<PageNumberObject<UserRightTypeBean>>() { |
| | | }.getType(); |
| | | PageNumberObject<UserRightTypeBean> pageNumberObject = gson.fromJson(jsonStr, type); |
| | | |
| | | UserRightTypeBean userRightTypeBean = gson.fromJson(jsonStr, UserRightTypeBean.class); |
| | | if (cloudCallBeak != null) { |
| | | cloudCallBeak.onSuccess(pageNumberObject); |
| | | cloudCallBeak.onSuccess(userRightTypeBean); |
| | | } |
| | | } |
| | | |