瀏覽代碼

修改老师端评价列表页面

Pq 6 月之前
父節點
當前提交
40e5b67757
共有 20 個文件被更改,包括 1232 次插入329 次删除
  1. 47 0
      BaseLibrary/src/main/java/com/cooleshow/base/constanst/CourseType.java
  2. 3 3
      classRoom/src/main/java/com/dayayuemeng/classroom/utils/FileUtils.java
  3. 15 4
      teacher/src/main/java/com/cooleshow/teacher/adapter/CourseCommentNotReplyAdapter.java
  4. 7 16
      teacher/src/main/java/com/cooleshow/teacher/adapter/ReceivedCommentListAdapter.java
  5. 130 0
      teacher/src/main/java/com/cooleshow/teacher/bean/CourseCommentListBean.java
  6. 121 0
      teacher/src/main/java/com/cooleshow/teacher/bean/ReceivedCommentListBean.java
  7. 53 0
      teacher/src/main/java/com/cooleshow/teacher/constants/CommentType.java
  8. 0 4
      teacher/src/main/java/com/cooleshow/teacher/contract/CourseCommentContract.java
  9. 0 1
      teacher/src/main/java/com/cooleshow/teacher/contract/ReceivedCommentContract.java
  10. 7 3
      teacher/src/main/java/com/cooleshow/teacher/presenter/comment/CourseCommentPresenter.java
  11. 4 2
      teacher/src/main/java/com/cooleshow/teacher/presenter/comment/ReceivedCommentPresenter.java
  12. 72 38
      teacher/src/main/java/com/cooleshow/teacher/ui/comment/CourseCommentActivity.java
  13. 139 27
      teacher/src/main/java/com/cooleshow/teacher/ui/comment/MineCourseCommentFragment.java
  14. 1 1
      teacher/src/main/java/com/cooleshow/teacher/ui/comment/ReceivedCommentActivity.java
  15. 120 62
      teacher/src/main/java/com/cooleshow/teacher/ui/comment/ReceivedCommentFragment.java
  16. 50 50
      teacher/src/main/res/layout/activity_course_comment_layout.xml
  17. 95 16
      teacher/src/main/res/layout/fragment_course_comment_no_reply_layout.xml
  18. 150 0
      teacher/src/main/res/layout/fragment_course_received_comment_layout.xml
  19. 111 36
      teacher/src/main/res/layout/item_course_comment_list_layout.xml
  20. 107 66
      teacher/src/main/res/layout/item_received_comment_layout.xml

+ 47 - 0
BaseLibrary/src/main/java/com/cooleshow/base/constanst/CourseType.java

@@ -0,0 +1,47 @@
+package com.cooleshow.base.constanst;
+
+import com.contrarywind.interfaces.IPickerViewData;
+import com.cooleshow.base.interfaces.IFilterViewData;
+
+/**
+ * Author by pq, Date on 2022/12/23.
+ */
+public enum CourseType implements IPickerViewData, IFilterViewData {
+    ALL("", "全部课程"),
+    VIP("VIP", "VIP定制课"),
+    PRACTICE("PRACTICE", "趣纠课"),
+    LIVE("LIVE", "直播课"),
+    PIANO_ROOM_CLASS("PIANO_ROOM_CLASS", "琴房课");
+
+
+    private final String value;
+    private final String id;
+
+    public String getValue() {
+        return value;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    CourseType(String id, String s) {
+        this.id = id;
+        this.value = s;
+    }
+
+    @Override
+    public String getPickerViewText() {
+        return getValue();
+    }
+
+    @Override
+    public String getDataId() {
+        return getId();
+    }
+
+    @Override
+    public String getShowName() {
+        return getValue();
+    }
+}

+ 3 - 3
classRoom/src/main/java/com/dayayuemeng/classroom/utils/FileUtils.java

@@ -1303,7 +1303,7 @@ public class FileUtils {
         Uri uri = null;
         final boolean isN = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N;
         if (isN) {
-            uri = FileProvider.getUriForFile(context, context.getPackageName() + ".FileProvider", file);
+            uri = FileProvider.getUriForFile(context, context.getPackageName() + ".fileprovider", file);
         } else {
             uri = Uri.fromFile(file);
         }
@@ -1320,7 +1320,7 @@ public class FileUtils {
         Uri uri = null;
         final boolean isN = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N;
         if (isN) {
-            uri = FileProvider.getUriForFile(context, context.getPackageName() + ".FileProvider", file);
+            uri = FileProvider.getUriForFile(context, context.getPackageName() + ".fileprovider", file);
         } else {
             uri = Uri.fromFile(file);
 
@@ -1375,7 +1375,7 @@ public class FileUtils {
         Uri uri = null;
         final boolean isN = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N;
         if (isN) {
-            uri = FileProvider.getUriForFile(context, context.getPackageName() + ".FileProvider", file);
+            uri = FileProvider.getUriForFile(context, context.getPackageName() + ".fileprovider", file);
         } else {
             uri = Uri.fromFile(file);
 

+ 15 - 4
teacher/src/main/java/com/cooleshow/teacher/adapter/CourseCommentNotReplyAdapter.java

@@ -2,6 +2,7 @@ package com.cooleshow.teacher.adapter;
 
 import android.widget.ImageView;
 import android.widget.RatingBar;
+import android.widget.TextView;
 
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.module.BaseLoadMoreModule;
@@ -30,13 +31,23 @@ public class CourseCommentNotReplyAdapter extends BaseQuickAdapter<CourseComment
         ImageView iv_avatar = holder.getView(R.id.iv_avatar);
         GlideUtils.INSTANCE.loadImage(getContext(), bean.avatar, iv_avatar, R.drawable.icon_teacher_default_head);
         //名称
-        holder.setText(R.id.tv_title, bean.userName);
+        holder.setText(R.id.tv_title, bean.getCourseGroupName());
+
+        holder.setText(R.id.tv_name, bean.userName);
         //声部名称
         holder.setText(R.id.tv_course_name, bean.subjectName);
         //时间
-        holder.setText(R.id.tv_time, UiUtils.getCourseTimeString(bean.startTime,bean.endTime));
-
-
+        holder.setText(R.id.tv_time, UiUtils.getCourseTimeString(bean.startTime, bean.endTime));
+
+        TextView tv_state = holder.getView(R.id.tv_state);
+        boolean isComment = bean.teacherReplied == 1;
+        if (isComment) {
+            tv_state.setText("已评价");
+            tv_state.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_ff802c));
+        } else {
+            tv_state.setText("未评价");
+            tv_state.setTextColor(getContext().getResources().getColor(com.cooleshow.base.R.color.color_999999));
+        }
     }
 
     @NonNull

+ 7 - 16
teacher/src/main/java/com/cooleshow/teacher/adapter/ReceivedCommentListAdapter.java

@@ -3,6 +3,7 @@ package com.cooleshow.teacher.adapter;
 import android.text.TextUtils;
 import android.widget.ImageView;
 import android.widget.RatingBar;
+import android.widget.TextView;
 
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.module.BaseLoadMoreModule;
@@ -32,25 +33,15 @@ public class ReceivedCommentListAdapter extends BaseQuickAdapter<ReceivedComment
         ImageView iv_avatar = holder.getView(R.id.iv_avatar);
         GlideUtils.INSTANCE.loadImage(getContext(), bean.avatar, iv_avatar, R.drawable.icon_teacher_default_head);
         //名称
-        holder.setText(R.id.tv_title, bean.userName);
+        holder.setText(R.id.tv_title, bean.getCourseGroupName());
+
+        holder.setText(R.id.tv_name, bean.userName);
         //声部名称
         holder.setText(R.id.tv_course_name, bean.subjectName);
         //时间
-        holder.setText(R.id.tv_time, UiUtils.getCourseTimeString(bean.startTime,bean.endTime));
-        //评价内容
-        holder.setText(R.id.tv_comment_content, bean.studentRepliedStr);
-        //评分
-        RatingBar ratingBar = holder.getView(R.id.rating_bar_for_student);
-        int rating = 0;
-        if (!TextUtils.isEmpty(bean.score)) {
-            try {
-                rating = Integer.parseInt(bean.score);
-            } catch (Exception e) {
-                e.printStackTrace();
-                rating = 0;
-            }
-        }
-        ratingBar.setRating(rating);
+        holder.setText(R.id.tv_time, UiUtils.getCourseTimeString(bean.startTime, bean.endTime));
+
+        TextView tv_state = holder.getView(R.id.tv_state);
     }
 
     @NonNull

+ 130 - 0
teacher/src/main/java/com/cooleshow/teacher/bean/CourseCommentListBean.java

@@ -100,5 +100,135 @@ public class CourseCommentListBean {
         public String subjectName;
         public String userId;
         public String userName;
+        public String courseGroupName;
+        public int teacherReplied;
+
+        public int getTeacherReplied() {
+            return teacherReplied;
+        }
+
+        public void setTeacherReplied(int teacherReplied) {
+            this.teacherReplied = teacherReplied;
+        }
+
+        public String getAvatar() {
+            return avatar;
+        }
+
+        public void setAvatar(String avatar) {
+            this.avatar = avatar;
+        }
+
+        public String getClassDate() {
+            return classDate;
+        }
+
+        public void setClassDate(String classDate) {
+            this.classDate = classDate;
+        }
+
+        public String getCourseGoupId() {
+            return courseGoupId;
+        }
+
+        public void setCourseGoupId(String courseGoupId) {
+            this.courseGoupId = courseGoupId;
+        }
+
+        public String getCourseId() {
+            return courseId;
+        }
+
+        public void setCourseId(String courseId) {
+            this.courseId = courseId;
+        }
+
+        public String getEndTime() {
+            return endTime;
+        }
+
+        public void setEndTime(String endTime) {
+            this.endTime = endTime;
+        }
+
+        public int getId() {
+            return id;
+        }
+
+        public void setId(int id) {
+            this.id = id;
+        }
+
+        public String getRealName() {
+            return realName;
+        }
+
+        public void setRealName(String realName) {
+            this.realName = realName;
+        }
+
+        public String getSignInTime() {
+            return signInTime;
+        }
+
+        public void setSignInTime(String signInTime) {
+            this.signInTime = signInTime;
+        }
+
+        public String getStartTime() {
+            return startTime;
+        }
+
+        public void setStartTime(String startTime) {
+            this.startTime = startTime;
+        }
+
+        public String getStatus() {
+            return status;
+        }
+
+        public void setStatus(String status) {
+            this.status = status;
+        }
+
+        public int getSubjectId() {
+            return subjectId;
+        }
+
+        public void setSubjectId(int subjectId) {
+            this.subjectId = subjectId;
+        }
+
+        public String getSubjectName() {
+            return subjectName;
+        }
+
+        public void setSubjectName(String subjectName) {
+            this.subjectName = subjectName;
+        }
+
+        public String getUserId() {
+            return userId;
+        }
+
+        public void setUserId(String userId) {
+            this.userId = userId;
+        }
+
+        public String getUserName() {
+            return userName;
+        }
+
+        public void setUserName(String userName) {
+            this.userName = userName;
+        }
+
+        public String getCourseGroupName() {
+            return courseGroupName;
+        }
+
+        public void setCourseGroupName(String courseGroupName) {
+            this.courseGroupName = courseGroupName;
+        }
     }
 }

+ 121 - 0
teacher/src/main/java/com/cooleshow/teacher/bean/ReceivedCommentListBean.java

@@ -98,5 +98,126 @@ public class ReceivedCommentListBean {
         public String subjectName;
         public int userId;
         public String userName;
+        public String courseGroupName;
+
+        public String getAvatar() {
+            return avatar;
+        }
+
+        public void setAvatar(String avatar) {
+            this.avatar = avatar;
+        }
+
+        public String getClassDate() {
+            return classDate;
+        }
+
+        public void setClassDate(String classDate) {
+            this.classDate = classDate;
+        }
+
+        public int getCourseGroupId() {
+            return courseGroupId;
+        }
+
+        public void setCourseGroupId(int courseGroupId) {
+            this.courseGroupId = courseGroupId;
+        }
+
+        public int getCourseId() {
+            return courseId;
+        }
+
+        public void setCourseId(int courseId) {
+            this.courseId = courseId;
+        }
+
+        public String getEndTime() {
+            return endTime;
+        }
+
+        public void setEndTime(String endTime) {
+            this.endTime = endTime;
+        }
+
+        public String getRealName() {
+            return realName;
+        }
+
+        public void setRealName(String realName) {
+            this.realName = realName;
+        }
+
+        public String getScore() {
+            return score;
+        }
+
+        public void setScore(String score) {
+            this.score = score;
+        }
+
+        public String getStartTime() {
+            return startTime;
+        }
+
+        public void setStartTime(String startTime) {
+            this.startTime = startTime;
+        }
+
+        public String getStudentReplied() {
+            return studentReplied;
+        }
+
+        public void setStudentReplied(String studentReplied) {
+            this.studentReplied = studentReplied;
+        }
+
+        public String getStudentRepliedStr() {
+            return studentRepliedStr;
+        }
+
+        public void setStudentRepliedStr(String studentRepliedStr) {
+            this.studentRepliedStr = studentRepliedStr;
+        }
+
+        public int getSubjectId() {
+            return subjectId;
+        }
+
+        public void setSubjectId(int subjectId) {
+            this.subjectId = subjectId;
+        }
+
+        public String getSubjectName() {
+            return subjectName;
+        }
+
+        public void setSubjectName(String subjectName) {
+            this.subjectName = subjectName;
+        }
+
+        public int getUserId() {
+            return userId;
+        }
+
+        public void setUserId(int userId) {
+            this.userId = userId;
+        }
+
+        public String getUserName() {
+            return userName;
+        }
+
+        public void setUserName(String userName) {
+            this.userName = userName;
+        }
+
+        public String getCourseGroupName() {
+            return courseGroupName;
+        }
+
+        public void setCourseGroupName(String courseGroupName) {
+            this.courseGroupName = courseGroupName;
+        }
     }
 }

+ 53 - 0
teacher/src/main/java/com/cooleshow/teacher/constants/CommentType.java

@@ -0,0 +1,53 @@
+package com.cooleshow.teacher.constants;
+
+import com.contrarywind.interfaces.IPickerViewData;
+import com.cooleshow.base.interfaces.IFilterViewData;
+
+/**
+ * Author by pq, Date on 2024/6/24.
+ */
+public enum CommentType implements IPickerViewData, IFilterViewData {
+    ALL("", "全部状态"),
+    NOT_REPLY("0", "未评价"),
+    HAS_REPLY("1", "已评价");
+
+    CommentType(String id, String value) {
+        this.id = id;
+        this.value = value;
+    }
+
+    private String id;
+    private String value;
+
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getText() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    @Override
+    public String getPickerViewText() {
+        return getText();
+    }
+
+    @Override
+    public String getDataId() {
+        return getId();
+    }
+
+    @Override
+    public String getShowName() {
+        return getText();
+    }
+}

+ 0 - 4
teacher/src/main/java/com/cooleshow/teacher/contract/CourseCommentContract.java

@@ -16,9 +16,5 @@ public interface CourseCommentContract {
 
     interface Presenter {
 
-        /**
-         * 查询课后评价列表
-         */
-        void queryCourseCommentList(boolean isShowLoading, int repliedStatus, String classMonth, String studentName, int page);
     }
 }

+ 0 - 1
teacher/src/main/java/com/cooleshow/teacher/contract/ReceivedCommentContract.java

@@ -14,6 +14,5 @@ public interface ReceivedCommentContract {
     }
 
     interface Presenter {
-        void queryReceivedComment(boolean isShowLoading, String month, String studentName, int page);
     }
 }

+ 7 - 3
teacher/src/main/java/com/cooleshow/teacher/presenter/comment/CourseCommentPresenter.java

@@ -18,19 +18,23 @@ import org.json.JSONObject;
  */
 public class CourseCommentPresenter extends BasePresenter<CourseCommentContract.CourseCommentView> implements CourseCommentContract.Presenter {
 
-    @Override
-    public void queryCourseCommentList(boolean isShowLoading,int repliedStatus, String classMonth, String studentName, int page) {
+    public void queryCourseCommentList(boolean isShowLoading, String classMonth, String studentName, String status,String courseType,int page) {
         if (isShowLoading && getView() != null) {
             getView().showLoading();
         }
         JSONObject jsonObject = new JSONObject();
         try {
             jsonObject.putOpt("classMonth", classMonth);
-            jsonObject.putOpt("replied", repliedStatus);
+            if(!TextUtils.isEmpty(status)){
+                jsonObject.putOpt("replied", status);
+            }
             jsonObject.putOpt("page", page);
             if (!TextUtils.isEmpty(studentName)) {
                 jsonObject.putOpt("studentName", studentName);
             }
+            if(!TextUtils.isEmpty(courseType)){
+                jsonObject.putOpt("courseType", courseType);
+            }
             jsonObject.putOpt("rows", Constants.DEFAULT_DATA_SIZE);
         } catch (JSONException e) {
             e.printStackTrace();

+ 4 - 2
teacher/src/main/java/com/cooleshow/teacher/presenter/comment/ReceivedCommentPresenter.java

@@ -18,8 +18,7 @@ import org.json.JSONObject;
  */
 public class ReceivedCommentPresenter extends BasePresenter<ReceivedCommentContract.ReceivedCommentView> implements ReceivedCommentContract.Presenter {
 
-    @Override
-    public void queryReceivedComment(boolean isShowLoading, String month, String studentName, int page) {
+    public void queryReceivedComment(boolean isShowLoading, String month, String studentName,String courseType, int page) {
         if (isShowLoading && getView() != null) {
             getView().showLoading();
         }
@@ -30,6 +29,9 @@ public class ReceivedCommentPresenter extends BasePresenter<ReceivedCommentContr
             if (!TextUtils.isEmpty(studentName)) {
                 jsonObject.putOpt("studentName", studentName);
             }
+            if(!TextUtils.isEmpty(courseType)){
+                jsonObject.putOpt("courseType", courseType);
+            }
             jsonObject.putOpt("rows", Constants.DEFAULT_DATA_SIZE);
         } catch (JSONException e) {
             e.printStackTrace();

+ 72 - 38
teacher/src/main/java/com/cooleshow/teacher/ui/comment/CourseCommentActivity.java

@@ -2,22 +2,28 @@ package com.cooleshow.teacher.ui.comment;
 
 import android.graphics.Typeface;
 import android.os.Bundle;
+import android.view.LayoutInflater;
 import android.view.View;
+import android.widget.TextView;
 
 import com.alibaba.android.arouter.facade.annotation.Route;
 import com.alibaba.android.arouter.launcher.ARouter;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.activity.BaseActivity;
+import com.cooleshow.base.utils.Utils;
 import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
 import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.adapter.MineCoursePageAdapter;
 import com.cooleshow.teacher.databinding.ActivityCourseCommentLayoutBinding;
+import com.google.android.material.tabs.TabLayout;
+import com.google.android.material.tabs.TabLayoutMediator;
 
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
 
 import androidx.annotation.Nullable;
 import androidx.fragment.app.Fragment;
-import androidx.viewpager2.widget.ViewPager2;
 
 /**
  * Author by pq, Date on 2022/5/5.
@@ -25,6 +31,7 @@ import androidx.viewpager2.widget.ViewPager2;
 @Route(path = RouterPath.CommentCenter.TEACHER_COURSE_COMMENT)
 public class CourseCommentActivity extends BaseActivity<ActivityCourseCommentLayoutBinding> implements View.OnClickListener {
     private ArrayList<Fragment> mFragments = new ArrayList<>();
+    private List<String> titles = new ArrayList<String>(Arrays.asList("我的评价", "收到的评价"));
 
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
@@ -34,50 +41,47 @@ public class CourseCommentActivity extends BaseActivity<ActivityCourseCommentLay
 
     @Override
     protected void initView() {
-        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "我的评价");
-        viewBinding.toolbarInclude.tvRightText.setVisibility(View.VISIBLE);
-        viewBinding.toolbarInclude.tvRightText.setText("收到评价");
-        viewBinding.toolbarInclude.tvRightText.setOnClickListener(this);
-        viewBinding.radioGroup.setOnCheckedChangeListener((radioGroup, i) -> {
-            if (i == R.id.rb_not_reply) {
-                viewBinding.viewPager.setCurrentItem(0);
-            }
-            if (i == R.id.rb_completed) {
-                viewBinding.viewPager.setCurrentItem(1);
-            }
-        });
-        viewBinding.viewPager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {
-            @Override
-            public void onPageSelected(int position) {
-                super.onPageSelected(position);
-                changeTableLayoutBar(position);
-            }
-        });
+        Utils.setHeadView(viewBinding.viewStatusBar, this, 0);
     }
 
     @Override
     protected void initData() {
         super.initData();
-        CourseCommentNoReplyFragment noReplyFragment = new CourseCommentNoReplyFragment();
-        CourseCommentHasReplyFragment hasReplyFragment = new CourseCommentHasReplyFragment();
-        mFragments.add(noReplyFragment);
-        mFragments.add(hasReplyFragment);
-        MineCoursePageAdapter mineCoursePageAdapter = new MineCoursePageAdapter(this);
-        mineCoursePageAdapter.setFragments(mFragments);
-        viewBinding.viewPager.setAdapter(mineCoursePageAdapter);
+        initListener();
+        initTabLayoutAndViewPager();
     }
 
-    private void changeTableLayoutBar(int position) {
-        if (position == 0) {
-            viewBinding.rbNotReply.setChecked(true);
-            viewBinding.rbNotReply.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
-            viewBinding.rbCompleted.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL));
-        }
-        if (position == 1) {
-            viewBinding.rbCompleted.setChecked(true);
-            viewBinding.rbCompleted.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL));
-            viewBinding.rbNotReply.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
-        }
+
+    private void initListener() {
+        viewBinding.ivBack.setOnClickListener(this);
+        viewBinding.tablayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
+            @Override
+            public void onTabSelected(TabLayout.Tab tab) {
+                if (tab != null && tab.getCustomView() != null) {
+                    View customView = tab.getCustomView();
+                    TextView tv_text = customView.findViewById(R.id.tv_text);
+                    tv_text.setTextSize(16);
+                    tv_text.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_131415));
+                    tv_text.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
+                }
+            }
+
+            @Override
+            public void onTabUnselected(TabLayout.Tab tab) {
+                if (tab != null && tab.getCustomView() != null) {
+                    View customView = tab.getCustomView();
+                    TextView tv_text = customView.findViewById(R.id.tv_text);
+                    tv_text.setTextSize(16);
+                    tv_text.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_80000000));
+                    tv_text.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL));
+                }
+            }
+
+            @Override
+            public void onTabReselected(TabLayout.Tab tab) {
+
+            }
+        });
     }
 
     @Override
@@ -94,5 +98,35 @@ public class CourseCommentActivity extends BaseActivity<ActivityCourseCommentLay
                     .navigation();
             return;
         }
+
+        if (id == R.id.iv_back) {
+            finish();
+            return;
+        }
+    }
+
+    private void initTabLayoutAndViewPager() {
+        mFragments.clear();
+        TabLayoutMediator tabLayoutMediator = new TabLayoutMediator(viewBinding.tablayout, viewBinding.viewpager, (tab, position) -> {
+            //这里需要根据position修改tab的样式和文字等
+            createTab(tab, titles.get(position));
+        });
+
+        MineCourseCommentFragment noReplyFragment = new MineCourseCommentFragment();
+        ReceivedCommentFragment receivedCommentFragment = new ReceivedCommentFragment();
+        mFragments.add(noReplyFragment);
+        mFragments.add(receivedCommentFragment);
+        MineCoursePageAdapter mineCoursePageAdapter = new MineCoursePageAdapter(this);
+        mineCoursePageAdapter.setFragments(mFragments);
+        viewBinding.viewpager.setAdapter(mineCoursePageAdapter);
+        tabLayoutMediator.attach();
+    }
+
+    private TabLayout.Tab createTab(TabLayout.Tab tab, String text) {
+        View view = LayoutInflater.from(this).inflate(R.layout.view_mine_course_tab_layout, null);
+        TextView tv_text = view.findViewById(R.id.tv_text);
+        tv_text.setText(text);
+        tab.setCustomView(view);
+        return tab;
     }
 }

+ 139 - 27
teacher/src/main/java/com/cooleshow/teacher/ui/comment/CourseCommentHasReplyFragment.java → teacher/src/main/java/com/cooleshow/teacher/ui/comment/MineCourseCommentFragment.java

@@ -1,9 +1,9 @@
 package com.cooleshow.teacher.ui.comment;
 
+import android.content.DialogInterface;
 import android.graphics.Color;
 import android.text.TextUtils;
 import android.view.View;
-import android.widget.ImageView;
 import android.widget.TextView;
 
 import com.alibaba.android.arouter.launcher.ARouter;
@@ -11,34 +11,40 @@ import com.bigkoo.pickerview.builder.TimePickerBuilder;
 import com.bigkoo.pickerview.listener.CustomListener;
 import com.bigkoo.pickerview.view.TimePickerView;
 import com.chad.library.adapter.base.BaseQuickAdapter;
-import com.chad.library.adapter.base.listener.OnItemClickListener;
-import com.chad.library.adapter.base.listener.OnLoadMoreListener;
 import com.cooleshow.base.constanst.Constants;
+import com.cooleshow.base.constanst.CourseAttendanceStatusType;
+import com.cooleshow.base.constanst.CourseStatusType;
+import com.cooleshow.base.constanst.CourseType;
+import com.cooleshow.base.interfaces.IFilterViewData;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.fragment.BaseMVPFragment;
 import com.cooleshow.base.utils.TimeUtils;
+import com.cooleshow.base.utils.UiUtils;
 import com.cooleshow.base.widgets.EmptyViewLayout;
+import com.cooleshow.base.widgets.dialog.CommonFilterDialog;
 import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.adapter.CourseCommentNotReplyAdapter;
 import com.cooleshow.teacher.bean.CourseCommentListBean;
+import com.cooleshow.teacher.constants.CommentType;
+import com.cooleshow.teacher.constants.CourseConstants;
 import com.cooleshow.teacher.contract.CourseCommentContract;
 import com.cooleshow.teacher.databinding.FragmentCourseCommentNoReplyLayoutBinding;
 import com.cooleshow.teacher.presenter.comment.CourseCommentPresenter;
-import com.scwang.smart.refresh.layout.api.RefreshLayout;
-import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
+import com.cooleshow.teacher.ui.course.VIPOrInterestCourseGroupDetailActivity;
 
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Calendar;
 import java.util.Date;
+import java.util.List;
 
-import androidx.annotation.NonNull;
 import androidx.recyclerview.widget.LinearLayoutManager;
 
 /**
  * Author by pq, Date on 2022/5/5.
- * 陪练课评价-已评价学生
+ * 课后评价-我的评价
  */
-public class CourseCommentHasReplyFragment extends BaseMVPFragment<FragmentCourseCommentNoReplyLayoutBinding, CourseCommentPresenter> implements CourseCommentContract.CourseCommentView, View.OnClickListener {
-    public int courseCommentNotReply = 1;//已评价学生
+public class MineCourseCommentFragment extends BaseMVPFragment<FragmentCourseCommentNoReplyLayoutBinding, CourseCommentPresenter> implements CourseCommentContract.CourseCommentView, View.OnClickListener {
     private TimePickerView pvTime;
     private Date currentSelectDate;
     private String currentFilterDate;
@@ -47,6 +53,14 @@ public class CourseCommentHasReplyFragment extends BaseMVPFragment<FragmentCours
     private EmptyViewLayout mEmptyView;
     private boolean hasNext = true;
     private CourseCommentNotReplyAdapter mAdapter;
+    private CommonFilterDialog mStatusFilterDialog;
+    private List<IFilterViewData> statusList;//状态筛选
+    private List<IFilterViewData> attendanceStatusList;//课程筛选
+    private int currentSelectStatusPosition = 0;
+    private int currentSelectAttendancePosition = 0;
+    private String courseStatus;
+    private String courseType;
+    private CommonFilterDialog mCourseTypeFilterDialog;
 
     @Override
     protected FragmentCourseCommentNoReplyLayoutBinding getLayoutView() {
@@ -65,29 +79,42 @@ public class CourseCommentHasReplyFragment extends BaseMVPFragment<FragmentCours
 
     @Override
     protected void initData() {
+        initFilterData();
         currentSelectDate = TimeUtils.getNowDate();
         mAdapter = new CourseCommentNotReplyAdapter(R.layout.item_course_comment_list_layout);
         mViewBinding.recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
         mViewBinding.recyclerView.setAdapter(mAdapter);
         initListener();
         reBuildFilter(currentSelectDate, currentStudentName);
+        currentPage = 1;
+        queryComment(false);
     }
 
     @Override
     public void onResume() {
         super.onResume();
-        currentPage = 1;
-        queryComment(false);
+    }
+
+    private void initFilterData() {
+        CommentType[] values = CommentType.values();
+        List<CommentType> courseGroupStatusTypes = Arrays.asList(values);
+        statusList = new ArrayList<IFilterViewData>(courseGroupStatusTypes);
+
+        attendanceStatusList = new ArrayList<>();
+        attendanceStatusList.add(CourseType.ALL);
+        attendanceStatusList.add(CourseType.VIP);
+        attendanceStatusList.add(CourseType.PRACTICE);
     }
 
     private void initListener() {
-        mViewBinding.tvDate.setOnClickListener(this);
+        mViewBinding.tvTime.setOnClickListener(this);
+        mViewBinding.tvCourseStatus.setOnClickListener(this);
+        mViewBinding.tvAgency.setOnClickListener(this);
         mViewBinding.tvSearch.setOnClickListener(this);
         mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> {
             currentPage = 1;
             queryComment(true);
         });
-
         mAdapter.setOnItemClickListener((adapter, view, position) -> {
             if (position < mAdapter.getData().size()) {
                 CourseCommentListBean.RowsBean rowsBean = mAdapter.getData().get(position);
@@ -95,6 +122,7 @@ public class CourseCommentHasReplyFragment extends BaseMVPFragment<FragmentCours
             }
         });
 
+
         mAdapter.getLoadMoreModule().setOnLoadMoreListener(() -> {
             //上拉加载
             if (hasNext) {
@@ -134,11 +162,11 @@ public class CourseCommentHasReplyFragment extends BaseMVPFragment<FragmentCours
         }
         currentStudentName = targetStr;
         currentFilterDate = targetDateTimeStr;
-        mViewBinding.tvDate.setText(currentFilterDate);
+        mViewBinding.tvTime.setText(currentFilterDate);
     }
 
     private void queryComment(boolean isShowLoading) {
-        presenter.queryCourseCommentList(isShowLoading, courseCommentNotReply, currentFilterDate, currentStudentName, currentPage);
+        presenter.queryCourseCommentList(isShowLoading, currentFilterDate, currentStudentName, courseStatus, courseType, currentPage);
     }
 
 
@@ -151,17 +179,28 @@ public class CourseCommentHasReplyFragment extends BaseMVPFragment<FragmentCours
                 reBuildFilter(date, currentStudentName);
                 currentPage = 1;
                 queryComment(true);
-            }).setLayoutRes(com.cooleshow.base.R.layout.pickerview_default_layout, v -> {
-                //自定义布局中的控件初始化及事件处理
-                final TextView tvSubmit =  v.findViewById(com.cooleshow.base.R.id.tv_finish);
-                TextView ivCancel =  v.findViewById(com.cooleshow.base.R.id.tv_cancel);
-                tvSubmit.setOnClickListener(v1 -> {
-                    pvTime.returnData();
-                    pvTime.dismiss();
-                });
-                ivCancel.setOnClickListener(v12 -> pvTime.dismiss());
-
-            })
+            }).setLayoutRes(com.cooleshow.base.R.layout.pickerview_default_layout, new CustomListener() {
+                        @Override
+                        public void customLayout(View v) {
+                            //自定义布局中的控件初始化及事件处理
+                            final TextView tvSubmit = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_finish);
+                            TextView ivCancel = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_cancel);
+                            tvSubmit.setOnClickListener(new View.OnClickListener() {
+                                @Override
+                                public void onClick(View v) {
+                                    pvTime.returnData();
+                                    pvTime.dismiss();
+                                }
+                            });
+                            ivCancel.setOnClickListener(new View.OnClickListener() {
+                                @Override
+                                public void onClick(View v) {
+                                    pvTime.dismiss();
+                                }
+                            });
+
+                        }
+                    })
                     .setTextColorOut(getResources().getColor(com.cooleshow.base.R.color.color_aaaaaa))
                     .setDividerColor(Color.TRANSPARENT)
                     .setBgColor(Color.TRANSPARENT)
@@ -182,11 +221,21 @@ public class CourseCommentHasReplyFragment extends BaseMVPFragment<FragmentCours
 
     @Override
     public void onClick(View v) {
-        if (v.getId() == R.id.tv_date) {
+        int id = v.getId();
+        if (id == R.id.tv_time) {
             //显示时间选择器
             showTimeSelectPicker();
             return;
         }
+        if (id == R.id.tv_course_status) {
+            selectCourseStatus();
+            return;
+        }
+
+        if (id == R.id.tv_agency) {
+            selectAttendanceStatus();
+            return;
+        }
 
         if (v.getId() == R.id.tv_search) {
             //搜索
@@ -197,6 +246,69 @@ public class CourseCommentHasReplyFragment extends BaseMVPFragment<FragmentCours
         }
     }
 
+    private void selectCourseStatus() {
+        if (mStatusFilterDialog == null) {
+            mStatusFilterDialog = new CommonFilterDialog<IFilterViewData>(getContext());
+            mStatusFilterDialog.setOnEventListener(new CommonFilterDialog.OnEventListener() {
+                @Override
+                public void onItemClickListener(BaseQuickAdapter baseQuickAdapter, int pos) {
+                    if (statusList != null && pos < statusList.size()) {
+                        MineCourseCommentFragment.this.currentSelectStatusPosition = pos;
+                        IFilterViewData iFilterViewData = statusList.get(pos);
+                        courseStatus = iFilterViewData.getDataId();
+                        mViewBinding.tvCourseStatus.setText(!TextUtils.isEmpty(courseStatus) ? iFilterViewData.getShowName() : "全部状态");
+                        queryComment(false);
+                    }
+                }
+            });
+
+            mStatusFilterDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
+                @Override
+                public void onDismiss(DialogInterface dialog) {
+                    UiUtils.refreshFilterTextStyle(false, mViewBinding.tvCourseStatus);
+                }
+            });
+        }
+        if (!mStatusFilterDialog.isShowing()) {
+            mStatusFilterDialog.show();
+            UiUtils.refreshFilterTextStyle(true, mViewBinding.tvCourseStatus);
+        }
+        mStatusFilterDialog.setSelectPos(currentSelectStatusPosition);
+        mStatusFilterDialog.setData(statusList);
+
+    }
+
+    private void selectAttendanceStatus() {
+        if (mCourseTypeFilterDialog == null) {
+            mCourseTypeFilterDialog = new CommonFilterDialog<IFilterViewData>(getContext());
+            mCourseTypeFilterDialog.setOnEventListener(new CommonFilterDialog.OnEventListener() {
+                @Override
+                public void onItemClickListener(BaseQuickAdapter baseQuickAdapter, int pos) {
+                    if (attendanceStatusList != null && pos < attendanceStatusList.size()) {
+                        MineCourseCommentFragment.this.currentSelectAttendancePosition = pos;
+                        IFilterViewData iFilterViewData = attendanceStatusList.get(pos);
+                        courseType = iFilterViewData.getDataId();
+                        mViewBinding.tvAgency.setText(iFilterViewData.getShowName());
+                        queryComment(false);
+                    }
+                }
+            });
+
+            mCourseTypeFilterDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
+                @Override
+                public void onDismiss(DialogInterface dialog) {
+                    UiUtils.refreshFilterTextStyle(false, mViewBinding.tvAgency);
+                }
+            });
+        }
+        if (!mCourseTypeFilterDialog.isShowing()) {
+            mCourseTypeFilterDialog.show();
+            UiUtils.refreshFilterTextStyle(true, mViewBinding.tvAgency);
+        }
+        mCourseTypeFilterDialog.setSelectPos(currentSelectAttendancePosition);
+        mCourseTypeFilterDialog.setData(attendanceStatusList);
+    }
+
     @Override
     public void queryCourseCommentSuccess(int page, CourseCommentListBean commentListBean) {
         if (isDetached()) {

+ 1 - 1
teacher/src/main/java/com/cooleshow/teacher/ui/comment/ReceivedCommentActivity.java

@@ -120,7 +120,7 @@ public class ReceivedCommentActivity extends BaseMVPActivity<ActivityReceivedCom
 
 
     private void queryComment(boolean isShowLoading) {
-        presenter.queryReceivedComment(isShowLoading, currentFilterDate, currentStudentName, currentPage);
+        presenter.queryReceivedComment(isShowLoading, currentFilterDate, currentStudentName,"", currentPage);
     }
 
     @Override

+ 120 - 62
teacher/src/main/java/com/cooleshow/teacher/ui/comment/CourseCommentNoReplyFragment.java → teacher/src/main/java/com/cooleshow/teacher/ui/comment/ReceivedCommentFragment.java

@@ -1,9 +1,9 @@
 package com.cooleshow.teacher.ui.comment;
 
+import android.content.DialogInterface;
 import android.graphics.Color;
 import android.text.TextUtils;
 import android.view.View;
-import android.widget.ImageView;
 import android.widget.TextView;
 
 import com.alibaba.android.arouter.launcher.ARouter;
@@ -11,34 +11,41 @@ import com.bigkoo.pickerview.builder.TimePickerBuilder;
 import com.bigkoo.pickerview.listener.CustomListener;
 import com.bigkoo.pickerview.view.TimePickerView;
 import com.chad.library.adapter.base.BaseQuickAdapter;
-import com.chad.library.adapter.base.listener.OnItemClickListener;
-import com.chad.library.adapter.base.listener.OnLoadMoreListener;
 import com.cooleshow.base.constanst.Constants;
+import com.cooleshow.base.constanst.CourseType;
+import com.cooleshow.base.interfaces.IFilterViewData;
 import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.fragment.BaseMVPFragment;
 import com.cooleshow.base.utils.TimeUtils;
+import com.cooleshow.base.utils.UiUtils;
 import com.cooleshow.base.widgets.EmptyViewLayout;
+import com.cooleshow.base.widgets.dialog.CommonFilterDialog;
 import com.cooleshow.teacher.R;
 import com.cooleshow.teacher.adapter.CourseCommentNotReplyAdapter;
+import com.cooleshow.teacher.adapter.ReceivedCommentListAdapter;
 import com.cooleshow.teacher.bean.CourseCommentListBean;
+import com.cooleshow.teacher.bean.ReceivedCommentListBean;
+import com.cooleshow.teacher.constants.CommentType;
 import com.cooleshow.teacher.contract.CourseCommentContract;
+import com.cooleshow.teacher.contract.ReceivedCommentContract;
 import com.cooleshow.teacher.databinding.FragmentCourseCommentNoReplyLayoutBinding;
+import com.cooleshow.teacher.databinding.FragmentCourseReceivedCommentLayoutBinding;
 import com.cooleshow.teacher.presenter.comment.CourseCommentPresenter;
-import com.scwang.smart.refresh.layout.api.RefreshLayout;
-import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
+import com.cooleshow.teacher.presenter.comment.ReceivedCommentPresenter;
 
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Calendar;
 import java.util.Date;
+import java.util.List;
 
-import androidx.annotation.NonNull;
 import androidx.recyclerview.widget.LinearLayoutManager;
 
 /**
  * Author by pq, Date on 2022/5/5.
- * 陪练课评价-未评价学生
+ * 课后评价-我的评价
  */
-public class CourseCommentNoReplyFragment extends BaseMVPFragment<FragmentCourseCommentNoReplyLayoutBinding, CourseCommentPresenter> implements CourseCommentContract.CourseCommentView, View.OnClickListener {
-    public int courseCommentNotReply = 0;//未回复
+public class ReceivedCommentFragment extends BaseMVPFragment<FragmentCourseReceivedCommentLayoutBinding, ReceivedCommentPresenter> implements ReceivedCommentContract.ReceivedCommentView, View.OnClickListener {
     private TimePickerView pvTime;
     private Date currentSelectDate;
     private String currentFilterDate;
@@ -46,16 +53,20 @@ public class CourseCommentNoReplyFragment extends BaseMVPFragment<FragmentCourse
     private int currentPage = 1;
     private EmptyViewLayout mEmptyView;
     private boolean hasNext = true;
-    private CourseCommentNotReplyAdapter mAdapter;
+    private ReceivedCommentListAdapter mAdapter;
+    private List<IFilterViewData> attendanceStatusList;//课程筛选
+    private int currentSelectAttendancePosition = 0;
+    private String courseType;
+    private CommonFilterDialog mCourseTypeFilterDialog;
 
     @Override
-    protected FragmentCourseCommentNoReplyLayoutBinding getLayoutView() {
-        return FragmentCourseCommentNoReplyLayoutBinding.inflate(getLayoutInflater());
+    protected FragmentCourseReceivedCommentLayoutBinding getLayoutView() {
+        return FragmentCourseReceivedCommentLayoutBinding.inflate(getLayoutInflater());
     }
 
     @Override
-    protected CourseCommentPresenter createPresenter() {
-        return new CourseCommentPresenter();
+    protected ReceivedCommentPresenter createPresenter() {
+        return new ReceivedCommentPresenter();
     }
 
     @Override
@@ -65,23 +76,32 @@ public class CourseCommentNoReplyFragment extends BaseMVPFragment<FragmentCourse
 
     @Override
     protected void initData() {
+        initFilterData();
         currentSelectDate = TimeUtils.getNowDate();
-        mAdapter = new CourseCommentNotReplyAdapter(R.layout.item_course_comment_list_layout);
+        mAdapter = new ReceivedCommentListAdapter(R.layout.item_received_comment_layout);
         mViewBinding.recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
         mViewBinding.recyclerView.setAdapter(mAdapter);
         initListener();
         reBuildFilter(currentSelectDate, currentStudentName);
+        currentPage = 1;
+        queryComment(false);
     }
 
     @Override
     public void onResume() {
         super.onResume();
-        currentPage = 1;
-        queryComment(false);
+    }
+
+    private void initFilterData() {
+        attendanceStatusList = new ArrayList<>();
+        attendanceStatusList.add(CourseType.ALL);
+        attendanceStatusList.add(CourseType.VIP);
+        attendanceStatusList.add(CourseType.PRACTICE);
     }
 
     private void initListener() {
-        mViewBinding.tvDate.setOnClickListener(this);
+        mViewBinding.tvTime.setOnClickListener(this);
+        mViewBinding.tvAgency.setOnClickListener(this);
         mViewBinding.tvSearch.setOnClickListener(this);
         mViewBinding.refreshLayout.setOnRefreshListener(refreshLayout -> {
             currentPage = 1;
@@ -89,8 +109,8 @@ public class CourseCommentNoReplyFragment extends BaseMVPFragment<FragmentCourse
         });
         mAdapter.setOnItemClickListener((adapter, view, position) -> {
             if (position < mAdapter.getData().size()) {
-                CourseCommentListBean.RowsBean rowsBean = mAdapter.getData().get(position);
-                startDetailActivity(rowsBean);
+                ReceivedCommentListBean.RowsBean rowsBean = mAdapter.getData().get(position);
+//                startDetailActivity(rowsBean);
             }
         });
 
@@ -116,7 +136,6 @@ public class CourseCommentNoReplyFragment extends BaseMVPFragment<FragmentCourse
                 .withString(CourseCommentDetailActivity.COURSE_GROUP_ID, rowsBean.courseGoupId)
                 .withString(CourseCommentDetailActivity.STUDENT_ID, rowsBean.userId)
                 .navigation();
-
     }
 
     /**
@@ -134,11 +153,11 @@ public class CourseCommentNoReplyFragment extends BaseMVPFragment<FragmentCourse
         }
         currentStudentName = targetStr;
         currentFilterDate = targetDateTimeStr;
-        mViewBinding.tvDate.setText(currentFilterDate);
+        mViewBinding.tvTime.setText(currentFilterDate);
     }
 
     private void queryComment(boolean isShowLoading) {
-        presenter.queryCourseCommentList(isShowLoading, courseCommentNotReply, currentFilterDate, currentStudentName, currentPage);
+        presenter.queryReceivedComment(isShowLoading, currentFilterDate, currentStudentName, courseType, currentPage);
     }
 
 
@@ -152,27 +171,27 @@ public class CourseCommentNoReplyFragment extends BaseMVPFragment<FragmentCourse
                 currentPage = 1;
                 queryComment(true);
             }).setLayoutRes(com.cooleshow.base.R.layout.pickerview_default_layout, new CustomListener() {
-                @Override
-                public void customLayout(View v) {
-                    //自定义布局中的控件初始化及事件处理
-                    final TextView tvSubmit = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_finish);
-                    TextView ivCancel = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_cancel);
-                    tvSubmit.setOnClickListener(new View.OnClickListener() {
                         @Override
-                        public void onClick(View v) {
-                            pvTime.returnData();
-                            pvTime.dismiss();
-                        }
-                    });
-                    ivCancel.setOnClickListener(new View.OnClickListener() {
-                        @Override
-                        public void onClick(View v) {
-                            pvTime.dismiss();
-                        }
-                    });
+                        public void customLayout(View v) {
+                            //自定义布局中的控件初始化及事件处理
+                            final TextView tvSubmit = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_finish);
+                            TextView ivCancel = (TextView) v.findViewById(com.cooleshow.base.R.id.tv_cancel);
+                            tvSubmit.setOnClickListener(new View.OnClickListener() {
+                                @Override
+                                public void onClick(View v) {
+                                    pvTime.returnData();
+                                    pvTime.dismiss();
+                                }
+                            });
+                            ivCancel.setOnClickListener(new View.OnClickListener() {
+                                @Override
+                                public void onClick(View v) {
+                                    pvTime.dismiss();
+                                }
+                            });
 
-                }
-            })
+                        }
+                    })
                     .setTextColorOut(getResources().getColor(com.cooleshow.base.R.color.color_aaaaaa))
                     .setDividerColor(Color.TRANSPARENT)
                     .setBgColor(Color.TRANSPARENT)
@@ -193,12 +212,18 @@ public class CourseCommentNoReplyFragment extends BaseMVPFragment<FragmentCourse
 
     @Override
     public void onClick(View v) {
-        if (v.getId() == R.id.tv_date) {
+        int id = v.getId();
+        if (id == R.id.tv_time) {
             //显示时间选择器
             showTimeSelectPicker();
             return;
         }
 
+        if (id == R.id.tv_agency) {
+            selectAttendanceStatus();
+            return;
+        }
+
         if (v.getId() == R.id.tv_search) {
             //搜索
             String targetName = mViewBinding.etTargetName.getText().toString();
@@ -208,8 +233,58 @@ public class CourseCommentNoReplyFragment extends BaseMVPFragment<FragmentCourse
         }
     }
 
+    private void selectAttendanceStatus() {
+        if (mCourseTypeFilterDialog == null) {
+            mCourseTypeFilterDialog = new CommonFilterDialog<IFilterViewData>(getContext());
+            mCourseTypeFilterDialog.setOnEventListener(new CommonFilterDialog.OnEventListener() {
+                @Override
+                public void onItemClickListener(BaseQuickAdapter baseQuickAdapter, int pos) {
+                    if (attendanceStatusList != null && pos < attendanceStatusList.size()) {
+                        ReceivedCommentFragment.this.currentSelectAttendancePosition = pos;
+                        IFilterViewData iFilterViewData = attendanceStatusList.get(pos);
+                        courseType = iFilterViewData.getDataId();
+                        mViewBinding.tvAgency.setText(iFilterViewData.getShowName());
+                        queryComment(false);
+                    }
+                }
+            });
+
+            mCourseTypeFilterDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
+                @Override
+                public void onDismiss(DialogInterface dialog) {
+                    UiUtils.refreshFilterTextStyle(false, mViewBinding.tvAgency);
+                }
+            });
+        }
+        if (!mCourseTypeFilterDialog.isShowing()) {
+            mCourseTypeFilterDialog.show();
+            UiUtils.refreshFilterTextStyle(true, mViewBinding.tvAgency);
+        }
+        mCourseTypeFilterDialog.setSelectPos(currentSelectAttendancePosition);
+        mCourseTypeFilterDialog.setData(attendanceStatusList);
+    }
+
+
+    /**
+     * 检查是否还有下一页
+     *
+     * @param dataSize
+     */
+    private void checkHasNext(int dataSize) {
+        hasNext = dataSize >= Constants.DEFAULT_DATA_SIZE;
+    }
+
+    private void showEmptyView() {
+        if (mEmptyView == null) {
+            mEmptyView = new EmptyViewLayout(getContext());
+        }
+        mEmptyView.setContent(com.cooleshow.base.R.drawable.icon_empty_content, "暂无内容~");
+        mAdapter.setEmptyView(mEmptyView);
+    }
+
+
     @Override
-    public void queryCourseCommentSuccess(int page, CourseCommentListBean commentListBean) {
+    public void queryCommentSuccess(int page, ReceivedCommentListBean commentListBean) {
         if (isDetached()) {
             return;
         }
@@ -242,25 +317,8 @@ public class CourseCommentNoReplyFragment extends BaseMVPFragment<FragmentCourse
         }
     }
 
-    /**
-     * 检查是否还有下一页
-     *
-     * @param dataSize
-     */
-    private void checkHasNext(int dataSize) {
-        hasNext = dataSize >= Constants.DEFAULT_DATA_SIZE;
-    }
-
-    private void showEmptyView() {
-        if (mEmptyView == null) {
-            mEmptyView = new EmptyViewLayout(getContext());
-        }
-        mEmptyView.setContent(com.cooleshow.base.R.drawable.icon_empty_content, "暂无内容~");
-        mAdapter.setEmptyView(mEmptyView);
-    }
-
     @Override
-    public void queryCourseCommentError(int page) {
+    public void queryCommentError(int page) {
         if (isDetached()) {
             return;
         }

+ 50 - 50
teacher/src/main/res/layout/activity_course_comment_layout.xml

@@ -2,64 +2,64 @@
 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:orientation="vertical">
 
-    <include
-        android:id="@+id/toolbar_include"
-        layout="@layout/common_toolbar_layout" />
-
-    <RadioGroup
-        android:id="@+id/radio_group"
+    <ImageView
         android:layout_width="match_parent"
-        android:layout_height="@dimen/dp_40"
-        android:layout_marginTop="10dp"
-        android:gravity="center_vertical"
-        android:orientation="horizontal"
-        app:layout_constraintTop_toBottomOf="@+id/toolbar_include">
-
-        <RadioButton
-            android:id="@+id/rb_not_reply"
-            android:layout_width="@dimen/dp_0"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:background="@null"
-            android:button="@null"
-            android:checked="true"
-            android:drawableBottom="@drawable/btn_radio_bottom_line_selector"
-            android:drawablePadding="@dimen/dp_8"
-            android:gravity="center"
-            android:text="未评价"
-            android:textColor="@drawable/btn_radio_text_color_selector_stu"
-            android:textSize="@dimen/sp_17"
-            android:textStyle="bold" />
-
-
-        <RadioButton
-            android:id="@+id/rb_completed"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:background="@null"
-            android:button="@null"
-            android:drawableBottom="@drawable/btn_radio_bottom_line_selector"
-            android:drawablePadding="@dimen/dp_8"
-            android:gravity="center"
-            android:text="已评价"
-            android:textColor="@drawable/btn_radio_text_color_selector_stu"
-            android:textSize="@dimen/sp_17" />
-    </RadioGroup>
+        android:layout_height="wrap_content"
+        android:adjustViewBounds="true"
+        android:src="@drawable/bg_appointment_top"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
 
     <View
-        android:id="@+id/view_line"
+        android:id="@+id/view_status_bar"
         android:layout_width="match_parent"
-        android:layout_height="1dp"
-        android:background="@color/color_ededed"
-        app:layout_constraintTop_toBottomOf="@+id/radio_group" />
+        android:layout_height="1px"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.google.android.material.tabs.TabLayout
+        android:id="@+id/tablayout"
+        android:layout_width="wrap_content"
+        android:layout_height="@dimen/dp_50"
+        android:scrollbars="none"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/view_status_bar"
+        app:tabBackground="@null"
+        app:tabGravity="fill"
+        app:tabIndicator="@drawable/tab_indicator"
+        app:tabIndicatorColor="@color/color_2dc7aa"
+        app:tabIndicatorFullWidth="false"
+        app:tabIndicatorHeight="4dp"
+        app:tabMode="scrollable"
+        app:tabPaddingEnd="16dp"
+        app:tabPaddingStart="16dp"
+        app:tabRippleColor="@null"
+        app:tabSelectedTextColor="@color/black_333"
+        app:tabTextAppearance="@style/tab_layout_style"
+        app:tabTextColor="@color/color_666666" />
+    <ImageView
+        android:id="@+id/iv_back"
+        android:layout_width="wrap_content"
+        android:layout_height="0dp"
+        android:layout_gravity="center_vertical"
+        android:paddingStart="19dp"
+        android:paddingRight="12dp"
+        android:src="@drawable/icon_back_black"
+        app:layout_constraintBottom_toBottomOf="@+id/tablayout"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/tablayout" />
 
     <androidx.viewpager2.widget.ViewPager2
-        android:id="@+id/view_pager"
+        android:id="@+id/viewpager"
         android:layout_width="match_parent"
         android:layout_height="0dp"
+        android:layout_weight="1"
         app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/view_line" />
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/tablayout" />
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 95 - 16
teacher/src/main/res/layout/fragment_course_comment_no_reply_layout.xml

@@ -5,32 +5,111 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent">
 
-    <TextView
-        android:id="@+id/tv_date"
-        android:layout_width="wrap_content"
-        android:layout_height="36dp"
-        android:drawableRight="@drawable/icon_arrow_down"
-        android:drawablePadding="3dp"
-        android:gravity="center"
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:id="@+id/cs_filter"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
         android:paddingStart="14dp"
         android:paddingEnd="14dp"
-        android:textColor="@color/color_333333"
-        android:textSize="@dimen/sp_14"
-        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
         app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintTop_toTopOf="@+id/view_search_bg"
-        tools:text="2021年9月" />
+        app:layout_constraintTop_toTopOf="parent">
+
+        <androidx.constraintlayout.widget.Guideline
+            android:id="@+id/guide_line1"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:orientation="vertical"
+            app:layout_constraintGuide_percent="0.33" />
+
+        <androidx.constraintlayout.widget.Guideline
+            android:id="@+id/guide_line2"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:orientation="vertical"
+            app:layout_constraintGuide_percent="0.66" />
+
+        <TextView
+            android:id="@+id/tv_time"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:drawableRight="@drawable/icon_arrow_down"
+            android:drawablePadding="6dp"
+            android:ellipsize="end"
+            android:gravity="center"
+            android:includeFontPadding="false"
+            android:maxLines="1"
+            android:paddingStart="5dp"
+            android:paddingTop="12dp"
+            android:paddingEnd="5dp"
+            android:paddingBottom="12dp"
+            android:textColor="@color/color_131415"
+            android:textSize="@dimen/sp_14"
+            app:layout_constraintHorizontal_chainStyle="spread_inside"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintRight_toLeftOf="@+id/guide_line1"
+            app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintWidth_default="wrap"
+            tools:text="2021年19月" />
+
+        <TextView
+            android:id="@+id/tv_course_status"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:drawableRight="@drawable/icon_arrow_down"
+            android:drawablePadding="6dp"
+            android:ellipsize="end"
+            android:gravity="center"
+            android:includeFontPadding="false"
+            android:maxLines="1"
+            android:paddingStart="5dp"
+            android:paddingTop="12dp"
+            android:paddingEnd="5dp"
+            android:paddingBottom="12dp"
+            android:text="全部状态"
+            android:textColor="@color/color_131415"
+            android:textSize="@dimen/sp_14"
+            app:layout_constraintBottom_toBottomOf="@+id/tv_time"
+            app:layout_constraintLeft_toRightOf="@+id/guide_line1"
+            app:layout_constraintRight_toLeftOf="@+id/guide_line2"
+            app:layout_constraintTop_toTopOf="@+id/tv_time"
+            app:layout_constraintWidth_default="wrap"
+            tools:text="课程状态" />
+
+        <TextView
+            android:id="@+id/tv_agency"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:drawableRight="@drawable/icon_arrow_down"
+            android:drawablePadding="6dp"
+            android:ellipsize="end"
+            android:gravity="center"
+            android:includeFontPadding="false"
+            android:maxLines="1"
+            android:paddingStart="5dp"
+            android:paddingTop="12dp"
+            android:paddingEnd="5dp"
+            android:paddingBottom="12dp"
+            android:text="全部课程"
+            android:textColor="@color/color_131415"
+            android:textSize="@dimen/sp_14"
+            app:layout_constraintBottom_toBottomOf="@+id/tv_time"
+            app:layout_constraintLeft_toRightOf="@+id/guide_line2"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toTopOf="@+id/tv_time"
+            app:layout_constraintWidth_default="wrap"
+            tools:text="全部课程" />
+    </androidx.constraintlayout.widget.ConstraintLayout>
 
     <View
         android:id="@+id/view_search_bg"
         android:layout_width="0dp"
         android:layout_height="36dp"
-        android:layout_marginTop="16dp"
         android:layout_marginEnd="14dp"
+        android:layout_marginStart="14dp"
         android:background="@drawable/bg_white_18dp"
-        app:layout_constraintLeft_toRightOf="@+id/tv_date"
+        app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toTopOf="parent" />
+        app:layout_constraintTop_toBottomOf="@+id/cs_filter" />
 
     <ImageView
         android:id="@+id/iv_search_icon"
@@ -78,13 +157,13 @@
 
     <com.scwang.smart.refresh.layout.SmartRefreshLayout
         android:id="@+id/refreshLayout"
+        android:layout_marginTop="12dp"
         android:layout_width="match_parent"
         android:layout_height="0dp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintTop_toBottomOf="@+id/view_search_bg">
 
 
-
         <androidx.recyclerview.widget.RecyclerView
             android:id="@+id/recyclerView"
             android:layout_width="match_parent"

+ 150 - 0
teacher/src/main/res/layout/fragment_course_received_comment_layout.xml

@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:id="@+id/cs_filter"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingStart="14dp"
+        android:paddingEnd="14dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent">
+
+        <androidx.constraintlayout.widget.Guideline
+            android:id="@+id/guide_line1"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:orientation="vertical"
+            app:layout_constraintGuide_percent="0.5" />
+
+        <androidx.constraintlayout.widget.Guideline
+            android:id="@+id/guide_line2"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:orientation="vertical"
+            app:layout_constraintGuide_percent="0.66" />
+
+        <TextView
+            android:id="@+id/tv_time"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:drawableRight="@drawable/icon_arrow_down"
+            android:drawablePadding="6dp"
+            android:ellipsize="end"
+            android:gravity="center"
+            android:includeFontPadding="false"
+            android:maxLines="1"
+            android:paddingStart="5dp"
+            android:paddingTop="12dp"
+            android:paddingEnd="5dp"
+            android:paddingBottom="12dp"
+            android:textColor="@color/color_131415"
+            android:textSize="@dimen/sp_14"
+            app:layout_constraintHorizontal_chainStyle="spread_inside"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintRight_toLeftOf="@+id/guide_line1"
+            app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintWidth_default="wrap"
+            tools:text="2021年19月" />
+
+        <TextView
+            android:id="@+id/tv_agency"
+            android:layout_width="0dp"
+            android:layout_height="0dp"
+            android:drawableRight="@drawable/icon_arrow_down"
+            android:drawablePadding="6dp"
+            android:ellipsize="end"
+            android:gravity="center"
+            android:includeFontPadding="false"
+            android:maxLines="1"
+            android:paddingStart="5dp"
+            android:paddingTop="12dp"
+            android:paddingEnd="5dp"
+            android:paddingBottom="12dp"
+            android:text="全部课程"
+            android:textColor="@color/color_131415"
+            android:textSize="@dimen/sp_14"
+            app:layout_constraintBottom_toBottomOf="@+id/tv_time"
+            app:layout_constraintLeft_toRightOf="@+id/guide_line1"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toTopOf="@+id/tv_time"
+            app:layout_constraintWidth_default="wrap"
+            tools:text="全部课程" />
+    </androidx.constraintlayout.widget.ConstraintLayout>
+
+    <View
+        android:id="@+id/view_search_bg"
+        android:layout_width="0dp"
+        android:layout_height="36dp"
+        android:layout_marginEnd="14dp"
+        android:layout_marginStart="14dp"
+        android:background="@drawable/bg_white_18dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/cs_filter" />
+
+    <ImageView
+        android:id="@+id/iv_search_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="11dp"
+        android:src="@drawable/icon_search"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toLeftOf="@+id/view_search_bg"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+    <EditText
+        android:id="@+id/et_target_name"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="5dp"
+        android:background="@null"
+        android:ellipsize="end"
+        android:hint="请输入学员姓名"
+        android:maxLines="1"
+        android:paddingStart="8dp"
+        android:textColor="@color/color_333333"
+        android:textColorHint="@color/color_999999"
+        android:textSize="@dimen/sp_13"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintLeft_toRightOf="@+id/iv_search_icon"
+        app:layout_constraintRight_toLeftOf="@+id/tv_search"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+
+    <TextView
+        android:id="@+id/tv_search"
+        android:layout_width="56dp"
+        android:layout_height="28dp"
+        android:layout_marginEnd="4dp"
+        android:background="@drawable/shape_1ecdac_18dp"
+        android:gravity="center"
+        android:text="搜索"
+        android:textColor="@color/white"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintBottom_toBottomOf="@+id/view_search_bg"
+        app:layout_constraintRight_toRightOf="@+id/view_search_bg"
+        app:layout_constraintTop_toTopOf="@+id/view_search_bg" />
+
+
+    <com.scwang.smart.refresh.layout.SmartRefreshLayout
+        android:id="@+id/refreshLayout"
+        android:layout_marginTop="12dp"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/view_search_bg">
+
+
+        <androidx.recyclerview.widget.RecyclerView
+            android:id="@+id/recyclerView"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:overScrollMode="never"
+            android:scrollbars="none" />
+    </com.scwang.smart.refresh.layout.SmartRefreshLayout>
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 111 - 36
teacher/src/main/res/layout/item_course_comment_list_layout.xml

@@ -5,42 +5,126 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_marginStart="14dp"
-    android:layout_marginTop="12dp"
     android:layout_marginEnd="14dp"
+    android:layout_marginBottom="12dp"
     android:background="@drawable/bg_white_10dp"
-    android:paddingStart="11dp"
-    android:paddingEnd="11dp"
-    android:paddingBottom="15dp">
+    android:paddingStart="12dp"
+    android:paddingEnd="12dp"
+    android:paddingBottom="12dp">
 
-    <com.cooleshow.base.widgets.QMUIRadiusImageView
-        android:id="@+id/iv_avatar"
-        android:layout_width="47dp"
-        android:layout_height="51dp"
+    <ImageView
+        android:id="@+id/iv_clock_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
         android:layout_marginTop="15dp"
+        android:src="@drawable/icon_clock"
         app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        app:qmui_corner_radius="5dp" />
+        app:layout_constraintTop_toTopOf="parent" />
 
+    <TextView
+        android:id="@+id/tv_time"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="6dp"
+        android:includeFontPadding="false"
+        android:textColor="@color/color_666666"
+        android:textSize="@dimen/sp_13"
+        app:layout_constraintBottom_toBottomOf="@+id/iv_clock_icon"
+        app:layout_constraintLeft_toRightOf="@+id/iv_clock_icon"
+        app:layout_constraintTop_toTopOf="@+id/iv_clock_icon"
+        tools:text="2021/09/17 14:00~14:25" />
+
+    <View
+        android:id="@+id/view_line"
+        android:layout_width="0dp"
+        android:layout_height="1dp"
+        android:layout_marginTop="15dp"
+        android:background="@color/color_f2f2f2"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/iv_clock_icon" />
+
+    <de.hdodenhof.circleimageview.CircleImageView
+        android:id="@+id/iv_avatar"
+        android:layout_width="40dp"
+        android:layout_height="40dp"
+        android:layout_marginTop="12dp"
+        android:src="@drawable/icon_default_head"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/view_line"
+        app:qmui_corner_radius="5dp" />
 
     <TextView
         android:id="@+id/tv_title"
-        android:layout_width="wrap_content"
+        android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_marginStart="10dp"
-        android:layout_marginTop="3dp"
+        android:ellipsize="end"
         android:includeFontPadding="false"
+        android:maxLines="1"
         android:textColor="@color/color_1a1a1a"
-        android:textSize="@dimen/sp_16"
-        android:textStyle="bold"
+        android:textSize="@dimen/sp_15"
+        app:layout_constraintBottom_toTopOf="@+id/tv_name"
+        app:layout_constraintHorizontal_bias="0"
+        app:layout_constraintHorizontal_chainStyle="packed"
         app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
+        app:layout_constraintRight_toLeftOf="@+id/iv_attendance_status"
         app:layout_constraintTop_toTopOf="@+id/iv_avatar"
-        tools:text="张豆豆" />
+        app:layout_constraintVertical_chainStyle="packed"
+        app:layout_constraintWidth_default="wrap"
+        tools:text="VIP定制课-张豆豆VIP定制课张豆豆VIP定制课张豆豆VIP定制课-张豆豆" />
+
+    <ImageView
+        android:id="@+id/iv_attendance_status"
+        android:layout_width="wrap_content"
+        android:layout_height="17.1dp"
+        android:layout_marginStart="5dp"
+        android:layout_marginEnd="5dp"
+        android:adjustViewBounds="true"
+        android:src="@drawable/icon_course_attendance_truancy"
+        android:visibility="gone"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_title"
+        app:layout_constraintLeft_toRightOf="@+id/tv_title"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/tv_title"
+        tools:visibility="gone" />
+
+    <TextView
+        android:id="@+id/tv_name"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="4dp"
+        android:ellipsize="middle"
+        android:includeFontPadding="false"
+        android:singleLine="true"
+        android:textColor="@color/color_999999"
+        android:textSize="@dimen/sp_13"
+        app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
+        app:layout_constraintHorizontal_bias="0"
+        app:layout_constraintHorizontal_chainStyle="packed"
+        app:layout_constraintLeft_toLeftOf="@+id/tv_title"
+        app:layout_constraintRight_toLeftOf="@+id/tv_course_name"
+        app:layout_constraintTop_toBottomOf="@+id/tv_title"
+        app:layout_constraintWidth_default="wrap"
+        tools:text="张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆" />
+
+    <ImageView
+        android:id="@+id/iv_go_chat"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="5dp"
+        android:src="@drawable/icon_chat_small"
+        android:visibility="gone"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_title"
+        app:layout_constraintLeft_toRightOf="@+id/tv_title"
+        app:layout_constraintTop_toTopOf="@+id/tv_title" />
 
     <TextView
         android:id="@+id/tv_course_name"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginStart="5dp"
+        android:layout_marginEnd="5dp"
         android:background="@drawable/shape_couse_type_text_bg"
         android:gravity="center"
         android:includeFontPadding="false"
@@ -50,31 +134,22 @@
         android:paddingBottom="1.5dp"
         android:textColor="@color/color_ff8c00"
         android:textSize="@dimen/sp_10"
-        app:layout_constraintBottom_toBottomOf="@+id/tv_title"
-        app:layout_constraintLeft_toRightOf="@+id/tv_title"
-        app:layout_constraintTop_toTopOf="@+id/tv_title"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_name"
+        app:layout_constraintLeft_toRightOf="@+id/tv_name"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/tv_name"
         tools:text="单簧管" />
 
 
-    <ImageView
-        android:id="@+id/iv_clock_icon"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="11dp"
-        android:src="@drawable/icon_clock"
-        app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
-        app:layout_constraintLeft_toLeftOf="@+id/tv_title" />
-
     <TextView
-        android:id="@+id/tv_time"
+        android:id="@+id/tv_state"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="6dp"
-        android:includeFontPadding="false"
-        android:textColor="@color/color_666666"
-        android:textSize="@dimen/sp_13"
-        app:layout_constraintBottom_toBottomOf="@+id/iv_clock_icon"
-        app:layout_constraintLeft_toRightOf="@+id/iv_clock_icon"
-        app:layout_constraintTop_toTopOf="@+id/iv_clock_icon"
-        tools:text="2021/09/17 14:00~14:25" />
+        android:textColor="@color/color_999999"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintBottom_toTopOf="@+id/view_line"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        tools:text="未评价" />
+
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 107 - 66
teacher/src/main/res/layout/item_received_comment_layout.xml

@@ -5,49 +5,126 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_marginStart="14dp"
-    android:layout_marginTop="12dp"
     android:layout_marginEnd="14dp"
+    android:layout_marginBottom="12dp"
     android:background="@drawable/bg_white_10dp"
-    android:paddingStart="11dp"
-    android:paddingEnd="11dp"
-    android:paddingBottom="16dp">
+    android:paddingStart="12dp"
+    android:paddingEnd="12dp"
+    android:paddingBottom="12dp">
 
-    <com.cooleshow.base.widgets.QMUIRadiusImageView
+    <ImageView
+        android:id="@+id/iv_clock_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="15dp"
+        android:src="@drawable/icon_clock"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <TextView
+        android:id="@+id/tv_time"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="6dp"
+        android:includeFontPadding="false"
+        android:textColor="@color/color_666666"
+        android:textSize="@dimen/sp_13"
+        app:layout_constraintBottom_toBottomOf="@+id/iv_clock_icon"
+        app:layout_constraintLeft_toRightOf="@+id/iv_clock_icon"
+        app:layout_constraintTop_toTopOf="@+id/iv_clock_icon"
+        tools:text="2021/09/17 14:00~14:25" />
+
+    <View
+        android:id="@+id/view_line"
+        android:layout_width="0dp"
+        android:layout_height="1dp"
+        android:layout_marginTop="15dp"
+        android:background="@color/color_f2f2f2"
+        app:layout_constraintLeft_toLeftOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/iv_clock_icon" />
+
+    <de.hdodenhof.circleimageview.CircleImageView
         android:id="@+id/iv_avatar"
-        android:layout_width="47dp"
-        android:layout_height="51dp"
-        android:layout_marginTop="19dp"
+        android:layout_width="40dp"
+        android:layout_height="40dp"
+        android:layout_marginTop="12dp"
+        android:src="@drawable/icon_default_head"
         app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/view_line"
         app:qmui_corner_radius="5dp" />
 
-
     <TextView
         android:id="@+id/tv_title"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:layout_marginStart="10dp"
-        android:layout_marginTop="5dp"
+        android:ellipsize="end"
         android:includeFontPadding="false"
-        android:textColor="@color/color_1a1a1a"
-        android:textSize="@dimen/sp_16"
-        android:textStyle="bold"
         android:maxLines="1"
-        android:ellipsize="end"
+        android:textColor="@color/color_1a1a1a"
+        android:textSize="@dimen/sp_15"
+        app:layout_constraintBottom_toTopOf="@+id/tv_name"
         app:layout_constraintHorizontal_bias="0"
         app:layout_constraintHorizontal_chainStyle="packed"
         app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
-        app:layout_constraintRight_toLeftOf="@+id/tv_course_name"
+        app:layout_constraintRight_toLeftOf="@+id/iv_attendance_status"
         app:layout_constraintTop_toTopOf="@+id/iv_avatar"
+        app:layout_constraintVertical_chainStyle="packed"
         app:layout_constraintWidth_default="wrap"
-        tools:text="张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆" />
+        tools:text="VIP定制课-张豆豆VIP定制课张豆豆VIP定制课张豆豆VIP定制课-张豆豆" />
 
-    <TextView
+    <ImageView
+        android:id="@+id/iv_attendance_status"
+        android:layout_width="wrap_content"
+        android:layout_height="17.1dp"
+        android:layout_marginStart="5dp"
         android:layout_marginEnd="5dp"
+        android:adjustViewBounds="true"
+        android:src="@drawable/icon_course_attendance_truancy"
+        android:visibility="gone"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_title"
+        app:layout_constraintLeft_toRightOf="@+id/tv_title"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="@+id/tv_title"
+        tools:visibility="gone" />
+
+    <TextView
+        android:id="@+id/tv_name"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="4dp"
+        android:ellipsize="middle"
+        android:includeFontPadding="false"
+        android:singleLine="true"
+        android:textColor="@color/color_999999"
+        android:textSize="@dimen/sp_13"
+        app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
+        app:layout_constraintHorizontal_bias="0"
+        app:layout_constraintHorizontal_chainStyle="packed"
+        app:layout_constraintLeft_toLeftOf="@+id/tv_title"
+        app:layout_constraintRight_toLeftOf="@+id/tv_course_name"
+        app:layout_constraintTop_toBottomOf="@+id/tv_title"
+        app:layout_constraintWidth_default="wrap"
+        tools:text="张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆张豆豆" />
+
+    <ImageView
+        android:id="@+id/iv_go_chat"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="5dp"
+        android:src="@drawable/icon_chat_small"
+        android:visibility="gone"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_title"
+        app:layout_constraintLeft_toRightOf="@+id/tv_title"
+        app:layout_constraintTop_toTopOf="@+id/tv_title" />
+
+    <TextView
         android:id="@+id/tv_course_name"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginStart="5dp"
+        android:layout_marginEnd="5dp"
         android:background="@drawable/shape_couse_type_text_bg"
         android:gravity="center"
         android:includeFontPadding="false"
@@ -57,59 +134,23 @@
         android:paddingBottom="1.5dp"
         android:textColor="@color/color_ff8c00"
         android:textSize="@dimen/sp_10"
-        app:layout_constraintBottom_toBottomOf="@+id/tv_title"
-        app:layout_constraintLeft_toRightOf="@+id/tv_title"
-        app:layout_constraintRight_toLeftOf="@+id/rating_bar_for_student"
-        app:layout_constraintTop_toTopOf="@+id/tv_title"
-        tools:text="单簧管" />
-
-    <RatingBar
-        android:id="@+id/rating_bar_for_student"
-        style="@style/HomeRatingBar"
-        android:layout_width="wrap_content"
-        android:layout_height="19dp"
-        android:isIndicator="true"
-        android:numStars="5"
-        android:rating="3"
-        android:stepSize="1"
-        android:visibility="gone"
-        app:layout_constraintBottom_toBottomOf="@+id/tv_title"
+        app:layout_constraintBottom_toBottomOf="@+id/tv_name"
+        app:layout_constraintLeft_toRightOf="@+id/tv_name"
         app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toTopOf="@+id/tv_title" />
+        app:layout_constraintTop_toTopOf="@+id/tv_name"
+        tools:text="单簧管" />
 
 
-    <ImageView
-        android:id="@+id/iv_clock_icon"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="11dp"
-        android:src="@drawable/icon_clock"
-        app:layout_constraintBottom_toBottomOf="@+id/iv_avatar"
-        app:layout_constraintLeft_toLeftOf="@+id/tv_title" />
-
     <TextView
-        android:id="@+id/tv_time"
+        android:visibility="gone"
+        android:id="@+id/tv_state"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="6dp"
-        android:includeFontPadding="false"
-        android:textColor="@color/color_666666"
-        android:textSize="@dimen/sp_13"
-        app:layout_constraintBottom_toBottomOf="@+id/iv_clock_icon"
-        app:layout_constraintLeft_toRightOf="@+id/iv_clock_icon"
-        app:layout_constraintTop_toTopOf="@+id/iv_clock_icon"
-        tools:text="2021/09/17 14:00~14:25" />
-
-    <TextView
-        android:id="@+id/tv_comment_content"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="14dp"
-        android:includeFontPadding="false"
-        android:textColor="@color/color_333333"
-        android:textSize="@dimen/sp_13"
-        app:layout_constraintLeft_toLeftOf="parent"
+        android:textColor="@color/color_999999"
+        android:textSize="@dimen/sp_14"
+        app:layout_constraintBottom_toTopOf="@+id/view_line"
         app:layout_constraintRight_toRightOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/iv_avatar"
-        tools:text="老师非常有耐心,一个小节一个小节的帮助我抠细节,之前我觉得这首曲子我已经练得不错了,但是经过老师的指点后发现自己还有很多不足之处,现在再吹这首曲子明显更有表现力了!" />
+        app:layout_constraintTop_toTopOf="parent"
+        tools:text="未评价" />
+
 </androidx.constraintlayout.widget.ConstraintLayout>