From b93ca15aa55af7cf2dee653beb100076c897f152 Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期二, 25 六月 2024 16:56:38 +0800 Subject: [PATCH] 2024年06月25日16:56:31 --- app/src/main/java/com/hdl/photovoltaic/other/HdlMemberLogic.java | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlMemberLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlMemberLogic.java index 5b476c4..5aca561 100644 --- a/app/src/main/java/com/hdl/photovoltaic/other/HdlMemberLogic.java +++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlMemberLogic.java @@ -120,7 +120,7 @@ * @param userId - * @param cloudCallBeak - */ - public void getStaffInfo(String userId, CloudCallBeak<PageNumberObject<StaffBean>> cloudCallBeak) { + public void getStaffInfo(String userId, CloudCallBeak<StaffBean> cloudCallBeak) { String requestUrl = HttpApi.B_POST_GET_MANAGE_INFO; JsonObject json = new JsonObject(); json.addProperty("userId", userId); @@ -129,15 +129,14 @@ public void onSuccess(String jsonStr) { if (TextUtils.isEmpty(jsonStr)) { if (cloudCallBeak != null) { - cloudCallBeak.onSuccess(new PageNumberObject<>()); + cloudCallBeak.onSuccess(new StaffBean()); } } Gson gson = new Gson(); - Type type = new TypeToken<PageNumberObject<StaffBean>>() { - }.getType(); - PageNumberObject<StaffBean> pageNumberObject = gson.fromJson(jsonStr, type); + + StaffBean staffBean = gson.fromJson(jsonStr, StaffBean.class); if (cloudCallBeak != null) { - cloudCallBeak.onSuccess(pageNumberObject); + cloudCallBeak.onSuccess(staffBean); } } @@ -300,6 +299,7 @@ } + /** * 娣诲姞鎴愬憳锛圕绔級 * -- Gitblit v1.8.0