|
|
@@ -95,27 +95,28 @@ public class MyApplication extends Application {
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA);
|
|
|
String dateStr = simpleDateFormat.format(date);
|
|
|
RetrofitManager.getInstance().getRetrofit().create(ApiService.class)
|
|
|
- .roomMeetings(new QueryMeetingBody(dateStr + " 00:00:00", dateStr + " 23:59:59", room.getRoomNo())).enqueue(new Callback<List<RoomMeetings>>() {
|
|
|
- @Override
|
|
|
- public void onResponse(@NonNull Call<List<RoomMeetings>> call, @NonNull Response<List<RoomMeetings>> response) {
|
|
|
- if (response.code() == 200) {
|
|
|
- todayMeetings = response.body();
|
|
|
- EventBus.getDefault().post(Constants.EVENT_MEETINGS);
|
|
|
- } else {
|
|
|
- try {
|
|
|
- Toasty.error(MyApplication.this, response.errorBody().string()).show();
|
|
|
- } catch (IOException e) {
|
|
|
- e.printStackTrace();
|
|
|
+ .roomMeetings(new QueryMeetingBody(dateStr + " 00:00:00", dateStr + " 23:59:59", room.getRoomNo()))
|
|
|
+ .enqueue(new Callback<List<RoomMeetings>>() {
|
|
|
+ @Override
|
|
|
+ public void onResponse(@NonNull Call<List<RoomMeetings>> call, @NonNull Response<List<RoomMeetings>> response) {
|
|
|
+ if (response.code() == 200) {
|
|
|
+ todayMeetings = response.body();
|
|
|
+ EventBus.getDefault().post(Constants.EVENT_MEETINGS);
|
|
|
+ } else {
|
|
|
+ try {
|
|
|
+ Toasty.error(MyApplication.this, response.errorBody().string()).show();
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onFailure(@NonNull Call<List<RoomMeetings>> call, @NonNull Throwable t) {
|
|
|
- Toasty.info(MyApplication.this, "获取会议列表失败").show();
|
|
|
- t.printStackTrace();
|
|
|
- }
|
|
|
- });
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onFailure(@NonNull Call<List<RoomMeetings>> call, @NonNull Throwable t) {
|
|
|
+ Toasty.info(MyApplication.this, "获取会议列表失败").show();
|
|
|
+ t.printStackTrace();
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
|