| | |
| | | public class HdlMessageLogic { |
| | | private static volatile HdlMessageLogic sHdlMessageLogic; |
| | | |
| | | private final int pageSize = 50;//页数 |
| | | private final int pageSize = 100;//页数 |
| | | private List<MessageBean> mListMessage = new ArrayList<>(); |
| | | |
| | | |
| | |
| | | * @param cloudCallBeak - |
| | | */ |
| | | public void getMessageUntreatedCount(String homeId, CloudCallBeak<UnCountBean> cloudCallBeak) { |
| | | String requestUrl = HttpApi.POST_Message_UntreatedCount; |
| | | String requestUrl = HttpApi.POST_Message_Plan_UntreatedCount; |
| | | JsonObject json = new JsonObject(); |
| | | if (!TextUtils.isEmpty(homeId)) { |
| | | json.addProperty("homeId", homeId); |
| | |
| | | * @param cloudCallBeak - |
| | | */ |
| | | private void getMessageList(String messageStateType, CloudCallBeak<List<MessageBean>> cloudCallBeak) { |
| | | String requestUrl = HttpApi.POST_Message_List; |
| | | String requestUrl = HttpApi.POST_Message_Plan_List; |
| | | JsonObject json = new JsonObject(); |
| | | |
| | | if (!MessageStateType.all.equals(messageStateType)) { |
| | |
| | | * @param cloudCallBeak - |
| | | */ |
| | | public void getPageNoMessageList(int pageNo, String messageStateType, CloudCallBeak<MessageListClass> cloudCallBeak) { |
| | | String requestUrl = HttpApi.POST_Message_List; |
| | | String requestUrl = HttpApi.POST_Message_Plan_List; |
| | | JsonObject json = new JsonObject(); |
| | | |
| | | if (!MessageStateType.all.equals(messageStateType)) { |
| | |
| | | String timeType_filter_key, |
| | | String timeType_filter_value, |
| | | String search_title, CloudCallBeak<MessageListClass> cloudCallBeak) { |
| | | String requestUrl = HttpApi.POST_Message_List; |
| | | String requestUrl = HttpApi.POST_Message_Plan_List; |
| | | JsonObject json = new JsonObject(); |
| | | if (!TextUtils.isEmpty(homeId)) { |
| | | json.addProperty("homeId", homeId); |
| | |
| | | * @param cloudCallBeak - |
| | | */ |
| | | public void getMessageInfo(String msgId, CloudCallBeak<MessageBean> cloudCallBeak) { |
| | | String requestUrl = HttpApi.POST_Message_Info; |
| | | String requestUrl = HttpApi.POST_Message_Plan_Info; |
| | | JsonObject json = new JsonObject(); |
| | | json.addProperty("msgId", msgId); |
| | | HttpClient.getInstance().requestHttp(requestUrl, json.toString(), new CloudCallBeak<String>() { |
| | |
| | | * @param cloudCallBeak - |
| | | */ |
| | | public void messageAllRead(String homeId, CloudCallBeak<Boolean> cloudCallBeak) { |
| | | String requestUrl = HttpApi.POST_Message_AllRead; |
| | | String requestUrl = HttpApi.POST_Message_Plan_AllRead; |
| | | JsonObject json = new JsonObject(); |
| | | if (!TextUtils.isEmpty(homeId)) { |
| | | json.addProperty("homeId", homeId); |