浏览代码

增加IM曲谱消息发送

Pq 1 年之前
父节点
当前提交
3596ddbb94
共有 24 个文件被更改,包括 1102 次插入28 次删除
  1. 1 0
      TUIKit/TUIChat/tuichat/src/main/java/com/tencent/qcloud/tuikit/tuichat/classicui/widget/input/InputView.java
  2. 21 17
      TUIKit/TUIConversation/tuiconversation/src/main/java/com/tencent/qcloud/tuikit/tuiconversation/TUIConversationService.java
  3. 1 1
      TUIKit/TUIConversation/tuiconversation/src/main/java/com/tencent/qcloud/tuikit/tuiconversation/classicui/setting/ConversationLayoutSetting.java
  4. 1 1
      TUIKit/TUIConversation/tuiconversation/src/main/res-minimalistui/layout/minimalistui_conversation_forward_list_item_layout.xml
  5. 1 1
      TUIKit/TUIConversation/tuiconversation/src/main/res-minimalistui/layout/minimalistui_conversation_list_item_layout.xml
  6. 0 0
      TUIKit/TUIConversation/tuiconversation/src/main/res/drawable/tc_checkbox_selector.xml
  7. 1 1
      TUIKit/TUIConversation/tuiconversation/src/main/res/layout/conversation_list_item_layout.xml
  8. 8 1
      TUIKit/TUISearch/tuisearch/src/main/java/com/tencent/qcloud/tuikit/tuisearch/presenter/SearchMainPresenter.java
  9. 6 0
      chatModule/src/main/AndroidManifest.xml
  10. 96 0
      chatModule/src/main/java/com/cooleshow/chatmodule/adapter/MineScoreAdapter.java
  11. 10 0
      chatModule/src/main/java/com/cooleshow/chatmodule/api/IMApi.java
  12. 255 0
      chatModule/src/main/java/com/cooleshow/chatmodule/bean/MusicSheetListBean.java
  13. 12 1
      chatModule/src/main/java/com/cooleshow/chatmodule/constants/IMConstants.java
  14. 19 0
      chatModule/src/main/java/com/cooleshow/chatmodule/contract/SelectScoreChatContract.java
  15. 29 1
      chatModule/src/main/java/com/cooleshow/chatmodule/manager/IMCenter.java
  16. 9 0
      chatModule/src/main/java/com/cooleshow/chatmodule/message/bean/TUIChatShareMusicMessageBean.java
  17. 53 0
      chatModule/src/main/java/com/cooleshow/chatmodule/presenter/SelectScoreChatPresenter.java
  18. 258 0
      chatModule/src/main/java/com/cooleshow/chatmodule/ui/SelectScoreChatActivity.java
  19. 10 4
      chatModule/src/main/java/com/cooleshow/chatmodule/utils/helper/IMThemManager.java
  20. 117 0
      chatModule/src/main/java/com/cooleshow/chatmodule/widget/CustomChatInputMusicExtension.java
  21. 9 0
      chatModule/src/main/res/drawable/tc_chat_message_pop_left.xml
  22. 9 0
      chatModule/src/main/res/drawable/tc_chat_message_pop_right.xml
  23. 72 0
      chatModule/src/main/res/layout/tc_activity_select_score_chat.xml
  24. 104 0
      chatModule/src/main/res/layout/tc_cl_layout_mine_score_item.xml

+ 1 - 0
TUIKit/TUIChat/tuichat/src/main/java/com/tencent/qcloud/tuikit/tuichat/classicui/widget/input/InputView.java

@@ -1319,6 +1319,7 @@ public class InputView extends LinearLayout implements View.OnClickListener, Tex
 
         Map<String, Object> param = new HashMap<>();
         param.put(TUIConstants.TUIChat.Extension.InputMore.CONTEXT, getContext());
+        param.put(TUIConstants.TUIChat.FRAGMENT, mInputMoreFragment);
         if (ChatInfo.TYPE_C2C == mChatInfo.getType()) {
             param.put(TUIConstants.TUIChat.Extension.InputMore.USER_ID, mChatInfo.getId());
         } else {

+ 21 - 17
TUIKit/TUIConversation/tuiconversation/src/main/java/com/tencent/qcloud/tuikit/tuiconversation/TUIConversationService.java

@@ -3,6 +3,7 @@ package com.tencent.qcloud.tuikit.tuiconversation;
 import android.content.Context;
 import android.os.Bundle;
 import android.text.TextUtils;
+
 import com.tencent.imsdk.v2.V2TIMConversation;
 import com.tencent.imsdk.v2.V2TIMConversationListener;
 import com.tencent.imsdk.v2.V2TIMManager;
@@ -11,7 +12,6 @@ import com.tencent.imsdk.v2.V2TIMUserStatus;
 import com.tencent.qcloud.tuicore.ServiceInitializer;
 import com.tencent.qcloud.tuicore.TUIConstants;
 import com.tencent.qcloud.tuicore.TUICore;
-import com.tencent.qcloud.tuicore.TUILogin;
 import com.tencent.qcloud.tuikit.timcommon.component.interfaces.IUIKitCallback;
 import com.tencent.qcloud.tuikit.tuiconversation.bean.ConversationGroupBean;
 import com.tencent.qcloud.tuikit.tuiconversation.bean.ConversationInfo;
@@ -20,6 +20,7 @@ import com.tencent.qcloud.tuikit.tuiconversation.commonutil.TUIConversationLog;
 import com.tencent.qcloud.tuikit.tuiconversation.interfaces.ConversationEventListener;
 import com.tencent.qcloud.tuikit.tuiconversation.interfaces.ConversationGroupNotifyListener;
 import com.tencent.qcloud.tuikit.tuiconversation.presenter.ConversationPresenter;
+
 import java.lang.ref.SoftReference;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -318,9 +319,11 @@ public class TUIConversationService extends ServiceInitializer implements ITUICo
     }
 
     private void handleGroupEvent(String subKey, Map<String, Object> param) {
-        if (TextUtils.equals(subKey, TUIConstants.TUIGroup.EVENT_SUB_KEY_EXIT_GROUP)
-            || TextUtils.equals(subKey, TUIConstants.TUIGroup.EVENT_SUB_KEY_GROUP_DISMISS)
-            || TextUtils.equals(subKey, TUIConstants.TUIGroup.EVENT_SUB_KEY_GROUP_RECYCLE)) {
+        //20230811暂时去掉这个逻辑,群解散或者主动退群不删本地会话
+//        if (TextUtils.equals(subKey, TUIConstants.TUIGroup.EVENT_SUB_KEY_EXIT_GROUP)
+//            || TextUtils.equals(subKey, TUIConstants.TUIGroup.EVENT_SUB_KEY_GROUP_DISMISS)
+//            || TextUtils.equals(subKey, TUIConstants.TUIGroup.EVENT_SUB_KEY_GROUP_RECYCLE)) {
+        if (TextUtils.equals(subKey, TUIConstants.TUIGroup.EVENT_SUB_KEY_GROUP_RECYCLE)) {
             ConversationEventListener eventListener = getConversationEventListener();
             String groupId = null;
             if (param != null) {
@@ -342,19 +345,20 @@ public class TUIConversationService extends ServiceInitializer implements ITUICo
             if (TextUtils.isEmpty(groupId) || memberList == null || memberList.isEmpty()) {
                 return;
             }
-            for (String id : memberList) {
-                if (TextUtils.equals(id, TUILogin.getLoginUser())) {
-                    ConversationEventListener eventListener = getConversationEventListener();
-                    if (eventListener != null) {
-                        eventListener.deleteConversation(groupId, true);
-                    }
-                    List<ConversationEventListener> conversationEventObserverList = getConversationEventListenerList();
-                    for (ConversationEventListener conversationEventObserver : conversationEventObserverList) {
-                        conversationEventObserver.deleteConversation(groupId, true);
-                    }
-                    break;
-                }
-            }
+            //20230804暂时去掉这个逻辑,当前用户被踢出群的时候会删除本地会话-by:lyr
+//            for (String id : memberList) {
+//                if (TextUtils.equals(id, TUILogin.getLoginUser())) {
+//                    ConversationEventListener eventListener = getConversationEventListener();
+//                    if (eventListener != null) {
+//                        eventListener.deleteConversation(groupId, true);
+//                    }
+//                    List<ConversationEventListener> conversationEventObserverList = getConversationEventListenerList();
+//                    for (ConversationEventListener conversationEventObserver : conversationEventObserverList) {
+//                        conversationEventObserver.deleteConversation(groupId, true);
+//                    }
+//                    break;
+//                }
+//            }
         } else if (TextUtils.equals(subKey, TUIConstants.TUIGroup.EVENT_SUB_KEY_CLEAR_MESSAGE)) {
             String groupId = (String) getOrDefault(param.get(TUIConstants.TUIGroup.GROUP_ID), "");
             ConversationEventListener eventListener = getConversationEventListener();

+ 1 - 1
TUIKit/TUIConversation/tuiconversation/src/main/java/com/tencent/qcloud/tuikit/tuiconversation/classicui/setting/ConversationLayoutSetting.java

@@ -11,7 +11,7 @@ public class ConversationLayoutSetting {
         listLayout.setItemTopTextSize(16);
         listLayout.setItemBottomTextSize(12);
         listLayout.setItemDateTextSize(10);
-        listLayout.setItemAvatarRadius(ScreenUtil.dip2px(24));
+        listLayout.setItemAvatarRadius(ScreenUtil.dip2px(6));
         listLayout.disableItemUnreadDot(false);
 
         // 动态插入,删除Item,包括自定义会话

+ 1 - 1
TUIKit/TUIConversation/tuiconversation/src/main/res-minimalistui/layout/minimalistui_conversation_forward_list_item_layout.xml

@@ -113,7 +113,7 @@
             android:layout_height="14dp"
             android:layout_alignParentLeft="true"
             android:layout_gravity="center_vertical"
-            android:button="@drawable/checkbox_selector"
+            android:button="@drawable/tc_checkbox_selector"
             android:visibility="gone"
             tools:visibility="visible"/>
 

+ 1 - 1
TUIKit/TUIConversation/tuiconversation/src/main/res-minimalistui/layout/minimalistui_conversation_list_item_layout.xml

@@ -107,7 +107,7 @@
             android:layout_alignParentLeft="true"
             android:layout_gravity="center_vertical"
             android:layout_marginRight="6.23dp"
-            android:button="@drawable/checkbox_selector"
+            android:button="@drawable/tc_checkbox_selector"
             android:visibility="gone"
             tools:visibility="visible"/>
 

+ 0 - 0
TUIKit/TUIConversation/tuiconversation/src/main/res/drawable/checkbox_selector.xml → TUIKit/TUIConversation/tuiconversation/src/main/res/drawable/tc_checkbox_selector.xml


+ 1 - 1
TUIKit/TUIConversation/tuiconversation/src/main/res/layout/conversation_list_item_layout.xml

@@ -18,7 +18,7 @@
         android:layout_alignParentLeft="true"
         android:layout_gravity="center_vertical"
         android:layout_marginRight="6.23dp"
-        android:button="@drawable/checkbox_selector"
+        android:button="@drawable/tc_checkbox_selector"
         android:visibility="gone" />
 
     <RelativeLayout

+ 8 - 1
TUIKit/TUISearch/tuisearch/src/main/java/com/tencent/qcloud/tuikit/tuisearch/presenter/SearchMainPresenter.java

@@ -246,7 +246,14 @@ public class SearchMainPresenter {
                             searchDataBean.setGroupID(conversationInfo.getId());
                             searchDataBean.setGroup(conversationInfo.isGroup());
                             searchDataBean.setGroupType(conversationInfo.getGroupType());
-                            searchDataBean.setIconPath(conversationInfo.getIconPath());
+                            if(conversationInfo.isGroup()){
+                                List<Object> iconUrlList = conversationInfo.getIconUrlList();
+                                if(iconUrlList!=null && iconUrlList.size()>0){
+                                    searchDataBean.setIconPath((String) iconUrlList.get(0));
+                                }
+                            }else{
+                                searchDataBean.setIconPath(conversationInfo.getIconPath());
+                            }
                             searchDataBean.setTitle(conversationInfo.getTitle());
                             searchDataBean.setRemark(conversationInfo.getTitle());
                             conversationSearchDataBeans.add(searchDataBean);

+ 6 - 0
chatModule/src/main/AndroidManifest.xml

@@ -38,6 +38,12 @@
             android:configChanges="orientation|screenSize|keyboardHidden"
             android:screenOrientation="portrait" />
 
+        <activity
+            android:name=".ui.SelectScoreChatActivity"
+            android:configChanges="orientation|screenSize|keyboardHidden"
+            android:screenOrientation="portrait"
+            android:windowSoftInputMode="adjustPan" />
+
         <provider
             android:name=".widget.CustomChatGroupTopRightIconExtension"
             android:authorities="${applicationId}.TUIGroup.ClassicUI.Init"

+ 96 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/adapter/MineScoreAdapter.java

@@ -0,0 +1,96 @@
+package com.cooleshow.chatmodule.adapter;
+
+import android.text.TextUtils;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.module.BaseLoadMoreModule;
+import com.chad.library.adapter.base.module.LoadMoreModule;
+import com.chad.library.adapter.base.viewholder.BaseViewHolder;
+import com.cooleshow.base.utils.GlideUtils;
+import com.cooleshow.chatmodule.R;
+import com.cooleshow.chatmodule.bean.MusicSheetListBean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import androidx.annotation.NonNull;
+import androidx.constraintlayout.widget.ConstraintLayout;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+
+/**
+ * 创建日期:2022/5/20 17:19
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class MineScoreAdapter extends BaseQuickAdapter<MusicSheetListBean.RowsBean, BaseViewHolder> implements LoadMoreModule {
+
+    public MineScoreAdapter() {
+        super(R.layout.tc_cl_layout_mine_score_item);
+    }
+
+
+    @Override
+    protected void convert(BaseViewHolder helper, MusicSheetListBean.RowsBean item) {
+        TextView tv_name = helper.getView(R.id.tv_name);
+        TextView tv_author_name = helper.getView(R.id.tv_author_name);
+        ImageView im_state = helper.getView(R.id.im_state);
+        ImageView im_header = helper.getView(R.id.im_header);
+        TextView tv_teacher_name = helper.getView(R.id.tv_teacher_name);
+        RecyclerView rv_mark = helper.getView(R.id.rv_mark);
+        ConstraintLayout constraintLayout=helper.getView(R.id.constraintLayout);
+
+        switch (item.chargeType) {
+            case "FREE":
+                im_state.setBackgroundResource(R.drawable.tc_icon_score_free);
+                break;
+            case "VIP":
+                im_state.setBackgroundResource(R.drawable.tc_icon_score_vip);
+                break;
+            case "CHARGE":
+                im_state.setBackgroundResource(R.drawable.tc_icon_score_demand);
+                break;
+        }
+        tv_name.setText(item.musicSheetName);
+        tv_author_name.setText(item.composer);
+        GlideUtils.INSTANCE.loadImage(getContext(), item.addUserAvatar, im_header, R.drawable.tc_icon_teacher_default_head);
+        tv_teacher_name.setText(item.addName);
+        if (!TextUtils.isEmpty(item.musicSheetName)) {
+            rv_mark.setVisibility(View.VISIBLE);
+            List<String> markList = new ArrayList<>();
+            if (item.musicSheetName.contains(",")) {
+                String[] split = item.musicSheetName.split(",");
+                for (String s : split) {
+                    markList.add(s);
+                }
+            } else {
+                markList.add(item.musicSheetName);
+            }
+            LinearLayoutManager manager = new LinearLayoutManager(getContext());
+            manager.setOrientation(LinearLayoutManager.HORIZONTAL);
+            rv_mark.setLayoutManager(manager);
+            ItemMarkAdapter itemMarkAdapter = new ItemMarkAdapter(markList);
+            rv_mark.setAdapter(itemMarkAdapter);
+        } else {
+            rv_mark.setVisibility(View.GONE);
+        }
+
+        if (item.isSelect){
+            constraintLayout.setBackgroundResource(com.cooleshow.base.R.drawable.bg_white_10dp_border_2dc7aa);
+        }else {
+            constraintLayout.setBackgroundResource(com.cooleshow.base.R.drawable.bg_white_10dp);
+        }
+    }
+
+    @NonNull
+    @Override
+    public BaseLoadMoreModule addLoadMoreModule(@NonNull BaseQuickAdapter<?, ?> baseQuickAdapter) {
+        return new BaseLoadMoreModule(baseQuickAdapter);
+    }
+
+}

+ 10 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/api/IMApi.java

@@ -8,6 +8,7 @@ import com.cooleshow.chatmodule.bean.GroupApplyBean;
 import com.cooleshow.chatmodule.bean.GroupMemberBean;
 import com.cooleshow.chatmodule.bean.GroupNoticeBean;
 import com.cooleshow.chatmodule.bean.IMGroupInfo;
+import com.cooleshow.chatmodule.bean.MusicSheetListBean;
 
 import java.util.List;
 
@@ -139,4 +140,13 @@ public interface IMApi {
      */
     @POST("{group_name}" + "/imGroupMemberAudit/applyAudit")
     Observable<BaseResponse<Object>> doGroupApply(@Body RequestBody body,@Path("group_name")String group_name);
+
+    /**
+     * 分页查询分页查询
+     *
+     * @param body
+     * @return
+     */
+    @POST("{group_name}" + "/music/sheet/list")
+    Observable<BaseResponse<MusicSheetListBean>> queryMusicList(@Body RequestBody body,@Path("group_name")String group_name);
 }

+ 255 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/bean/MusicSheetListBean.java

@@ -0,0 +1,255 @@
+package com.cooleshow.chatmodule.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.List;
+
+/**
+ * 创建日期:2022/5/20 17:07
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class MusicSheetListBean {
+
+    public int limit;
+    public int nextPage;
+    public int offset;
+    public int pageNo;
+    public int prePage;
+    public int total;
+    public int totalPage;
+    public List<RowsBean> rows;
+
+    public static class RowsBean implements Parcelable {
+        /*
+        {
+				"addName": "",
+				"addUserAvatar": "",
+				"audioFileUrl": "",
+				"audioType": "",
+				"auditStatus": "",
+				"auditVersion": "",
+				"canEvaluate": "",
+				"chargeType": "",
+				"composer": "",
+				"createBy": 0,
+				"createTime": "",
+				"delFlag": true,
+				"favorite": "",
+				"hasBeat": "",
+				"hotFlag": "",
+				"id": 0,
+				"metronomeUrl": "",
+				"midiUrl": "",
+				"mp3Type": "",
+				"musicPrice": 0,
+				"musicSheetName": "",
+				"musicSubject": "",
+				"musicTag": "",
+				"musicTagNames": "",
+				"play": "",
+				"playSpeed": 0,
+				"remark": "",
+				"showFingering": "",
+				"sortNumber": 0,
+				"sourceType": "",
+				"state": "",
+				"subjectNames": "",
+				"submitAuditTime": "",
+				"topFlag": "",
+				"updateBy": 0,
+				"updateTime": "",
+				"url": "",
+				"userId": 0,
+				"xmlFileUrl": ""
+			}
+
+         */
+
+        public String addName;
+        public String addUserAvatar;
+        public String audioFileUrl;
+        public String audioType;
+        public String auditStatus;
+        public String auditVersion;
+        public String canEvaluate;
+        public String chargeType;
+        public String composer;
+        public String createTime;
+        public boolean delFlag;
+        public String favorite;
+        public String hasBeat;
+        public String hotFlag;
+        public int id;
+        public String metronomeUrl;
+        public String midiUrl;
+        public String mp3Type;
+        public String musicPrice;
+        public String musicSheetName;
+        public String musicSubject;
+        public String musicTag;
+        public String musicTagNames;
+        public String play;
+        public int playSpeed;
+        public String remark;
+        public String showFingering;
+        public int sortNumber;
+        public String sourceType;
+        public String state;
+        public String subjectNames;
+        public String submitAuditTime;
+        public String topFlag;
+        public String updateTime;
+        public String url;
+        public int userId;
+        public String xmlFileUrl;
+        public boolean isSelect;
+
+
+        @Override
+        public int describeContents() {
+            return 0;
+        }
+
+        @Override
+        public void writeToParcel(Parcel dest, int flags) {
+            dest.writeString(this.addName);
+            dest.writeString(this.addUserAvatar);
+            dest.writeString(this.audioFileUrl);
+            dest.writeString(this.audioType);
+            dest.writeString(this.auditStatus);
+            dest.writeString(this.auditVersion);
+            dest.writeString(this.canEvaluate);
+            dest.writeString(this.chargeType);
+            dest.writeString(this.composer);
+            dest.writeString(this.createTime);
+            dest.writeByte(this.delFlag ? (byte) 1 : (byte) 0);
+            dest.writeString(this.favorite);
+            dest.writeString(this.hasBeat);
+            dest.writeString(this.hotFlag);
+            dest.writeInt(this.id);
+            dest.writeString(this.metronomeUrl);
+            dest.writeString(this.midiUrl);
+            dest.writeString(this.mp3Type);
+            dest.writeString(this.musicPrice);
+            dest.writeString(this.musicSheetName);
+            dest.writeString(this.musicSubject);
+            dest.writeString(this.musicTag);
+            dest.writeString(this.musicTagNames);
+            dest.writeString(this.play);
+            dest.writeInt(this.playSpeed);
+            dest.writeString(this.remark);
+            dest.writeString(this.showFingering);
+            dest.writeInt(this.sortNumber);
+            dest.writeString(this.sourceType);
+            dest.writeString(this.state);
+            dest.writeString(this.subjectNames);
+            dest.writeString(this.submitAuditTime);
+            dest.writeString(this.topFlag);
+            dest.writeString(this.updateTime);
+            dest.writeString(this.url);
+            dest.writeInt(this.userId);
+            dest.writeString(this.xmlFileUrl);
+            dest.writeByte(this.isSelect ? (byte) 1 : (byte) 0);
+        }
+
+        public void readFromParcel(Parcel source) {
+            this.addName = source.readString();
+            this.addUserAvatar = source.readString();
+            this.audioFileUrl = source.readString();
+            this.audioType = source.readString();
+            this.auditStatus = source.readString();
+            this.auditVersion = source.readString();
+            this.canEvaluate = source.readString();
+            this.chargeType = source.readString();
+            this.composer = source.readString();
+            this.createTime = source.readString();
+            this.delFlag = source.readByte() != 0;
+            this.favorite = source.readString();
+            this.hasBeat = source.readString();
+            this.hotFlag = source.readString();
+            this.id = source.readInt();
+            this.metronomeUrl = source.readString();
+            this.midiUrl = source.readString();
+            this.mp3Type = source.readString();
+            this.musicPrice = source.readString();
+            this.musicSheetName = source.readString();
+            this.musicSubject = source.readString();
+            this.musicTag = source.readString();
+            this.musicTagNames = source.readString();
+            this.play = source.readString();
+            this.playSpeed = source.readInt();
+            this.remark = source.readString();
+            this.showFingering = source.readString();
+            this.sortNumber = source.readInt();
+            this.sourceType = source.readString();
+            this.state = source.readString();
+            this.subjectNames = source.readString();
+            this.submitAuditTime = source.readString();
+            this.topFlag = source.readString();
+            this.updateTime = source.readString();
+            this.url = source.readString();
+            this.userId = source.readInt();
+            this.xmlFileUrl = source.readString();
+            this.isSelect = source.readByte() != 0;
+        }
+
+        public RowsBean() {
+        }
+
+        protected RowsBean(Parcel in) {
+            this.addName = in.readString();
+            this.addUserAvatar = in.readString();
+            this.audioFileUrl = in.readString();
+            this.audioType = in.readString();
+            this.auditStatus = in.readString();
+            this.auditVersion = in.readString();
+            this.canEvaluate = in.readString();
+            this.chargeType = in.readString();
+            this.composer = in.readString();
+            this.createTime = in.readString();
+            this.delFlag = in.readByte() != 0;
+            this.favorite = in.readString();
+            this.hasBeat = in.readString();
+            this.hotFlag = in.readString();
+            this.id = in.readInt();
+            this.metronomeUrl = in.readString();
+            this.midiUrl = in.readString();
+            this.mp3Type = in.readString();
+            this.musicPrice = in.readString();
+            this.musicSheetName = in.readString();
+            this.musicSubject = in.readString();
+            this.musicTag = in.readString();
+            this.musicTagNames = in.readString();
+            this.play = in.readString();
+            this.playSpeed = in.readInt();
+            this.remark = in.readString();
+            this.showFingering = in.readString();
+            this.sortNumber = in.readInt();
+            this.sourceType = in.readString();
+            this.state = in.readString();
+            this.subjectNames = in.readString();
+            this.submitAuditTime = in.readString();
+            this.topFlag = in.readString();
+            this.updateTime = in.readString();
+            this.url = in.readString();
+            this.userId = in.readInt();
+            this.xmlFileUrl = in.readString();
+            this.isSelect = in.readByte() != 0;
+        }
+
+        public static final Creator<RowsBean> CREATOR = new Creator<RowsBean>() {
+            @Override
+            public RowsBean createFromParcel(Parcel source) {
+                return new RowsBean(source);
+            }
+
+            @Override
+            public RowsBean[] newArray(int size) {
+                return new RowsBean[size];
+            }
+        };
+    }
+}

+ 12 - 1
chatModule/src/main/java/com/cooleshow/chatmodule/constants/IMConstants.java

@@ -1,9 +1,20 @@
 package com.cooleshow.chatmodule.constants;
 
+import com.cooleshow.chatmodule.BuildConfig;
+
 /**
  * Author by pq, Date on 2023/6/28.
  */
 public class IMConstants {
-    public static final int SDK_APPID = 1400805079;
     public static final String IS_SELECT_CONTACT = "IS_SELECT_CONTACT";
+
+    public static final int SDK_APPID = 1400805079;
+    public static final int SDK_APPID_RELEASE = 1400799837;
+
+    public static int getSdkAPPId() {
+        if (BuildConfig.DEBUG) {
+            return SDK_APPID;
+        }
+        return SDK_APPID_RELEASE;
+    }
 }

+ 19 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/contract/SelectScoreChatContract.java

@@ -0,0 +1,19 @@
+package com.cooleshow.chatmodule.contract;
+
+import com.cooleshow.base.presenter.view.BaseView;
+import com.cooleshow.chatmodule.bean.MusicSheetListBean;
+
+/**
+ * 创建日期:2022/6/10 15:32
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public interface SelectScoreChatContract {
+    interface SelectScoreChatView extends BaseView {
+        void queryMusicListSuccess(int page , MusicSheetListBean data);
+        void queryMusicListError(int page);
+    }
+    interface Presenter {
+    }
+}

+ 29 - 1
chatModule/src/main/java/com/cooleshow/chatmodule/manager/IMCenter.java

@@ -2,15 +2,20 @@ package com.cooleshow.chatmodule.manager;
 
 import android.content.Context;
 
+import com.alibaba.android.arouter.launcher.ARouter;
+import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.utils.LOG;
 import com.cooleshow.chatmodule.constants.IMConstants;
 import com.cooleshow.chatmodule.contract.IUnReadMessageObserver;
+import com.cooleshow.usercenter.constants.UserConstants;
+import com.cooleshow.usercenter.helper.UserHelper;
 import com.tencent.imsdk.v2.V2TIMCallback;
 import com.tencent.imsdk.v2.V2TIMConversationListener;
 import com.tencent.imsdk.v2.V2TIMManager;
 import com.tencent.imsdk.v2.V2TIMMessage;
 import com.tencent.qcloud.tuicore.TUILogin;
 import com.tencent.qcloud.tuicore.interfaces.TUICallback;
+import com.tencent.qcloud.tuicore.interfaces.TUILoginListener;
 import com.tencent.qcloud.tuicore.util.ErrorMessageConverter;
 import com.tencent.qcloud.tuikit.timcommon.component.interfaces.IUIKitCallback;
 import com.tencent.qcloud.tuikit.tuiconversation.commonutil.TUIConversationLog;
@@ -23,6 +28,21 @@ import com.tencent.qcloud.tuikit.tuigroup.util.TUIGroupUtils;
  */
 public class IMCenter {
     public static final String TAG = "IMCenter";
+    private TUILoginListener mListener = new TUILoginListener() {
+        @Override
+        public void onKickedOffline() {
+            super.onKickedOffline();
+            LOG.i("onKickedOffline");
+            goLogin();
+        }
+
+        @Override
+        public void onUserSigExpired() {
+            super.onUserSigExpired();
+            LOG.i("onUserSigExpired");
+            goLogin();
+        }
+    };
 
     private IMCenter() {
     }
@@ -43,7 +63,8 @@ public class IMCenter {
         if (loginStatus == V2TIMManager.V2TIM_STATUS_LOGINING) {
             return;
         }
-        TUILogin.login(context.getApplicationContext(), IMConstants.SDK_APPID, imUserId, imToken, new TUICallback() {
+        TUILogin.addLoginListener(mListener);
+        TUILogin.login(context.getApplicationContext(), IMConstants.getSdkAPPId(), imUserId, imToken, new TUICallback() {
             @Override
             public void onError(final int code, final String desc) {
                 LOG.i("im login onError:" + code + "--reason:" + desc);
@@ -58,6 +79,7 @@ public class IMCenter {
     }
 
     public void logoutIM() {
+        TUILogin.removeLoginListener(mListener);
         TUILogin.logout(new TUICallback() {
             @Override
             public void onSuccess() {
@@ -131,4 +153,10 @@ public class IMCenter {
     public void removeUnReadMessageObserver(IUnReadMessageObserver unReadMessageObserver) {
         V2TIMManager.getConversationManager().removeConversationListener(unReadMessageObserver);
     }
+
+    private void goLogin() {
+        ARouter.getInstance().build(RouterPath.UserCenter.PATH_VERIFY_LOGIN)
+                .withString(UserConstants.PHONE_NUM_KEY, UserHelper.getUserPhone())
+                .navigation();
+    }
 }

+ 9 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/message/bean/TUIChatShareMusicMessageBean.java

@@ -16,6 +16,15 @@ public class TUIChatShareMusicMessageBean extends TUIMessageBean {
     private String teacherName;
     private String musicTagNames;
     private String songId;
+    private String businessID;
+
+    public String getBusinessID() {
+        return businessID;
+    }
+
+    public void setBusinessID(String businessID) {
+        this.businessID = businessID;
+    }
 
     public String getSongName() {
         return songName;

+ 53 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/presenter/SelectScoreChatPresenter.java

@@ -0,0 +1,53 @@
+package com.cooleshow.chatmodule.presenter;
+
+import com.cooleshow.base.common.BaseConstant;
+import com.cooleshow.base.constanst.Constants;
+import com.cooleshow.base.presenter.BasePresenter;
+import com.cooleshow.base.rx.BaseObserver;
+import com.cooleshow.base.utils.RequestBodyUtil;
+import com.cooleshow.chatmodule.api.IMApi;
+import com.cooleshow.chatmodule.bean.MusicSheetListBean;
+import com.cooleshow.chatmodule.contract.SelectScoreChatContract;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ * 创建日期:2022/6/10 15:31
+ *
+ * @author Ryan
+ * 类说明:
+ */
+public class SelectScoreChatPresenter extends BasePresenter<SelectScoreChatContract.SelectScoreChatView> implements SelectScoreChatContract.Presenter {
+    public void queryPageCourseGroup(boolean isLoading, int page, String auditStatus,String search) {
+        if (isLoading && getView() != null) {
+            getView().showLoading();
+        }
+        JSONObject jsonObject = new JSONObject();
+        try {
+            jsonObject.put("auditStatus", auditStatus);
+            jsonObject.put("search", search);
+            jsonObject.putOpt("page", page);
+            jsonObject.putOpt("rows", Constants.DEFAULT_DATA_SIZE);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        addSubscribe(create(IMApi.class).queryMusicList(RequestBodyUtil.convertToRequestBodyJson(jsonObject.toString()), BaseConstant.CLIENT_API_GROUP_NAME), new BaseObserver<MusicSheetListBean>(getView()) {
+            @Override
+            protected void onSuccess(MusicSheetListBean data) {
+                if (getView() != null) {
+                    getView().queryMusicListSuccess(page, data);
+                }
+            }
+
+
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+                if (getView() != null) {
+                    getView().queryMusicListError(page);
+                }
+            }
+        });
+    }
+}

+ 258 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/ui/SelectScoreChatActivity.java

@@ -0,0 +1,258 @@
+package com.cooleshow.chatmodule.ui;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+
+import com.alibaba.android.arouter.facade.annotation.Route;
+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.router.RouterPath;
+import com.cooleshow.base.ui.activity.BaseMVPActivity;
+import com.cooleshow.base.utils.ToastUtil;
+import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
+import com.cooleshow.base.widgets.EmptyViewLayout;
+import com.cooleshow.chatmodule.R;
+import com.cooleshow.chatmodule.adapter.MineScoreAdapter;
+import com.cooleshow.chatmodule.bean.MusicSheetListBean;
+import com.cooleshow.chatmodule.constants.TCChatRouterPath;
+import com.cooleshow.chatmodule.contract.SelectScoreChatContract;
+import com.cooleshow.chatmodule.databinding.TcActivitySelectScoreChatBinding;
+import com.cooleshow.chatmodule.manager.IMCenter;
+import com.cooleshow.chatmodule.presenter.SelectScoreChatPresenter;
+import com.scwang.smart.refresh.layout.SmartRefreshLayout;
+import com.scwang.smart.refresh.layout.api.RefreshLayout;
+import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
+import com.tencent.imsdk.v2.V2TIMManager;
+import com.tencent.qcloud.tuikit.tuichat.util.ChatMessageBuilder;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+/**
+ * 创建日期:2022/6/10 15:28
+ *
+ * @author Ryan
+ * 类说明:
+ */
+@Route(path = TCChatRouterPath.CHAT_SELECT_SCORE)
+public class SelectScoreChatActivity extends BaseMVPActivity<TcActivitySelectScoreChatBinding, SelectScoreChatPresenter> implements SelectScoreChatContract.SelectScoreChatView, View.OnClickListener {
+
+
+    @Override
+    public void onClick(View view) {
+        if (view.getId() == R.id.tv_search) {
+            search = viewBinding.etTargetName.getText().toString().trim();
+            currentPage = 1;
+            queryScore(true);
+        } else if (view.getId() == com.cooleshow.base.R.id.tv_right_text) {
+            //发送曲谱到聊天室
+            for (MusicSheetListBean.RowsBean rowsBean : mineScoreAdapter.getData()) {
+                if (rowsBean.isSelect) {
+                    sendMessage(rowsBean);
+                    break;
+                }
+            }
+
+            finish();
+        }
+    }
+
+    private SmartRefreshLayout refreshLayout;
+    private RecyclerView recyclerView;
+    private MineScoreAdapter mineScoreAdapter;
+    private String targetId = "";
+
+    @Override
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        QMUIStatusBarHelper.setStatusBarLightMode(this);
+    }
+
+    @Override
+    protected void initView() {
+        initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "曲谱");
+        viewBinding.tvSearch.setOnClickListener(this);
+        viewBinding.toolbarInclude.tvRightText.setText("确定");
+        viewBinding.toolbarInclude.tvRightText.setVisibility(View.VISIBLE);
+        viewBinding.toolbarInclude.tvRightText.setOnClickListener(this);
+        viewBinding.toolbarInclude.tvRightText.setTextColor(getResources().getColor(com.cooleshow.base.R.color.color_2dc7aa));
+        refreshLayout = viewBinding.refreshLayout;
+        recyclerView = viewBinding.recyclerView;
+        refreshLayout.setOnRefreshListener(new OnRefreshListener() {
+            @Override
+            public void onRefresh(@NonNull RefreshLayout refreshLayout) {
+                currentPage = 1;
+                queryScore(true);
+            }
+        });
+
+        mineScoreAdapter = new MineScoreAdapter();
+        EmptyViewLayout emptyViewLayout = new EmptyViewLayout(this);
+        emptyViewLayout.setContent(com.cooleshow.base.R.drawable.icon_empty_content, "暂无曲谱");
+        mineScoreAdapter.setEmptyView(emptyViewLayout);
+//        mAdapter.getLoadMoreModule().setEnableLoadMoreIfNotFullPage(false);
+        mineScoreAdapter.getLoadMoreModule().setOnLoadMoreListener(new OnLoadMoreListener() {
+            @Override
+            public void onLoadMore() {
+                //上拉加载
+                if (hasNext) {
+                    currentPage++;
+                    queryScore(false);
+                } else {
+                    mineScoreAdapter.getLoadMoreModule().loadMoreEnd();
+                }
+            }
+        });
+        recyclerView.setLayoutManager(new LinearLayoutManager(this));
+        recyclerView.setAdapter(mineScoreAdapter);
+       /* viewBinding.etTargetName.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                if (actionId == EditorInfo.IME_ACTION_SEARCH || (event != null && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
+                    //点击搜索要做的操作
+                    search = viewBinding.etTargetName.getText().toString().trim();
+                    currentPage = 1;
+                    queryScore(true);
+                    return true;
+                }
+                return false;
+            }
+        });*/
+        mineScoreAdapter.setOnItemClickListener(new OnItemClickListener() {
+            @Override
+            public void onItemClick(@NonNull BaseQuickAdapter<?, ?> adapter, @NonNull View view, int position) {
+                MusicSheetListBean.RowsBean item = (MusicSheetListBean.RowsBean) adapter.getItem(position);
+                if (!item.isSelect) {
+                    for (MusicSheetListBean.RowsBean rowsBean : mineScoreAdapter.getData()) {
+                        if (rowsBean.id == item.id) {
+                            rowsBean.isSelect = true;
+                        } else {
+                            rowsBean.isSelect = false;
+                        }
+                    }
+                    mineScoreAdapter.notifyDataSetChanged();
+                }
+
+            }
+        });
+
+    }
+
+    private void sendMessage(MusicSheetListBean.RowsBean item) {
+        Intent intent = new Intent();
+        intent.putExtra("result", item);
+        setResult(RESULT_OK, intent);
+        finish();
+//        ChatMessageBuilder.buildCustomMessage()
+//        V2TIMManager.getMessageManager().sendMessage()
+
+
+//        RCChatShareMusicMessage rcChatShareMusicMessage = new RCChatShareMusicMessage();
+//
+//        rcChatShareMusicMessage.setSongName(item.musicSheetName);
+//        rcChatShareMusicMessage.setSongAuth(item.composer);
+//        rcChatShareMusicMessage.setMusicTagNames(item.musicSheetName);
+//        rcChatShareMusicMessage.setTeacherAvatar(item.addUserAvatar);
+//        rcChatShareMusicMessage.setTeacherName(item.addName);
+//        rcChatShareMusicMessage.setSongId(item.id + "");
+//        rcChatShareMusicMessage.setChargeType(item.chargeType);
+//
+//        Message locationMsg = Message.obtain(targetId, targetConversationType, rcChatShareMusicMessage);
+//        MessageTag annotation = rcChatShareMusicMessage.getClass().getAnnotation(MessageTag.class);
+//        if (annotation != null) {
+//            locationMsg.setObjectName(annotation.value());
+//        }
+//        RongIM.getInstance().sendMessage(locationMsg, "曲谱分享", "[曲谱分享]", new IRongCallback.ISendMessageCallback() {
+//            @Override
+//            public void onAttached(Message message) {
+//
+//            }
+//
+//            @Override
+//            public void onSuccess(Message message) {
+//                ToastUtil.getInstance().showShort("发送成功");
+//            }
+//
+//            @Override
+//            public void onError(Message message, RongIMClient.ErrorCode errorCode) {
+//                ToastUtil.getInstance().showShort("发送失败");
+//            }
+//        });
+    }
+
+    @Override
+    public void initData() {
+        super.initData();
+        currentPage = 1;
+        queryScore(false);
+    }
+
+    @Override
+    protected TcActivitySelectScoreChatBinding getLayoutView() {
+        return TcActivitySelectScoreChatBinding.inflate(getLayoutInflater());
+    }
+
+    @Override
+    protected SelectScoreChatPresenter createPresenter() {
+        return new SelectScoreChatPresenter();
+    }
+
+    private int currentPage;
+    private boolean hasNext = true;
+    private String search = "";
+
+    private void queryScore(boolean isLoading) {
+        //根据默认筛选条件查询
+        presenter.queryPageCourseGroup(isLoading, currentPage, "PASS", search);
+    }
+
+    /**
+     * 检查是否还有下一页
+     *
+     * @param dataSize
+     */
+    private void checkHasNext(int dataSize) {
+        hasNext = dataSize >= Constants.DEFAULT_DATA_SIZE;
+    }
+
+    @Override
+    public void queryMusicListSuccess(int page, MusicSheetListBean data) {
+        if (data != null) {
+            if (page == 1) {
+                mineScoreAdapter.getData().clear();
+                mineScoreAdapter.notifyDataSetChanged();
+                viewBinding.refreshLayout.finishRefresh();
+                if (data.rows != null && data.rows.size() > 0) {
+                    checkHasNext(data.rows.size());
+                    mineScoreAdapter.setNewInstance(data.rows);
+                }
+            } else {
+                if (data.rows != null && data.rows.size() > 0) {
+                    mineScoreAdapter.addData(data.rows);
+                    mineScoreAdapter.getLoadMoreModule().loadMoreComplete();
+                    checkHasNext(data.rows.size());
+                } else {
+                    mineScoreAdapter.getLoadMoreModule().loadMoreEnd();
+                }
+            }
+        }
+
+    }
+
+    @Override
+    public void queryMusicListError(int page) {
+        if (page == 1) {
+            viewBinding.refreshLayout.finishRefresh();
+        } else {
+            if (mineScoreAdapter != null) {
+                currentPage--;
+                mineScoreAdapter.getLoadMoreModule().loadMoreFail();
+            }
+        }
+    }
+}

+ 10 - 4
chatModule/src/main/java/com/cooleshow/chatmodule/utils/helper/IMThemManager.java

@@ -2,13 +2,17 @@ package com.cooleshow.chatmodule.utils.helper;
 
 import android.content.Context;
 
+import com.cooleshow.base.utils.SizeUtils;
 import com.cooleshow.chatmodule.R;
 import com.cooleshow.chatmodule.constants.TCMessageConstants;
 import com.cooleshow.chatmodule.message.bean.TUIChatShareLiveMessageBean;
 import com.cooleshow.chatmodule.message.bean.TUIChatShareMusicMessageBean;
 import com.cooleshow.chatmodule.message.holder.TUIChatShareLiveMessageHolder;
 import com.cooleshow.chatmodule.message.holder.TUIChatShareMusicMessageHolder;
+import com.cooleshow.chatmodule.widget.CustomChatInputMusicExtension;
 import com.tencent.qcloud.tuicore.TUIConfig;
+import com.tencent.qcloud.tuicore.TUIConstants;
+import com.tencent.qcloud.tuicore.TUICore;
 import com.tencent.qcloud.tuikit.timcommon.component.MessageProperties;
 import com.tencent.qcloud.tuikit.timcommon.util.ScreenUtil;
 import com.tencent.qcloud.tuikit.tuichat.TUIChatService;
@@ -40,9 +44,11 @@ public class IMThemManager {
         
 
         MessageProperties instance = MessageProperties.getInstance();
-        instance.setAvatarRadius(ScreenUtil.dip2px(20));
-        instance.setRightBubble(context.getResources().getDrawable(R.drawable.tc_rc_ic_message_bubble_right_));
-        instance.setLeftBubble(context.getResources().getDrawable(R.drawable.tc_rc_ic_message_bubble_left_));
+        instance.setRightBubble(context.getResources().getDrawable(R.drawable.tc_chat_message_pop_right));
+        instance.setLeftBubble(context.getResources().getDrawable(R.drawable.tc_chat_message_pop_left));
+        instance.setAvatarRadius(6);
+
+
 
         //禁用群聊合并展示九宫格头像
         TUIConfig.setEnableGroupGridAvatar(false);
@@ -52,7 +58,7 @@ public class IMThemManager {
         TUIChatConfigs.getConfigs().getGeneralConfig().setEnableVideoCall(false);
         TUIChatConfigs.getConfigs().getGeneralConfig().setEnableVoiceCall(false);
         //群聊右上角-群设置(也可以通过这种方式去设置)
-        //TUICore.registerExtensionToFirst(TUIConstants.TUIChat.Extension.ChatNavigationMoreItem.CLASSIC_EXTENSION_ID, new CustomChatGroupTopRightIconExtension());
+        TUICore.registerExtensionToFirst(TUIConstants.TUIChat.Extension.InputMore.CLASSIC_EXTENSION_ID, new CustomChatInputMusicExtension());
 
     }
 }

+ 117 - 0
chatModule/src/main/java/com/cooleshow/chatmodule/widget/CustomChatInputMusicExtension.java

@@ -0,0 +1,117 @@
+package com.cooleshow.chatmodule.widget;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Parcelable;
+import android.text.TextUtils;
+
+import com.alibaba.android.arouter.launcher.ARouter;
+import com.cooleshow.base.router.RouterPath;
+import com.cooleshow.base.utils.GsonUtils;
+import com.cooleshow.base.utils.LOG;
+import com.cooleshow.chatmodule.R;
+import com.cooleshow.chatmodule.bean.MusicSheetListBean;
+import com.cooleshow.chatmodule.constants.TCChatRouterPath;
+import com.cooleshow.chatmodule.constants.TCMessageConstants;
+import com.cooleshow.chatmodule.message.bean.TUIChatShareMusicMessageBean;
+import com.cooleshow.chatmodule.ui.SelectScoreChatActivity;
+import com.tencent.qcloud.tuicore.ServiceInitializer;
+import com.tencent.qcloud.tuicore.TUIConstants;
+import com.tencent.qcloud.tuicore.TUICore;
+import com.tencent.qcloud.tuicore.TUIThemeManager;
+import com.tencent.qcloud.tuicore.interfaces.ITUIExtension;
+import com.tencent.qcloud.tuicore.interfaces.TUIExtensionEventListener;
+import com.tencent.qcloud.tuicore.interfaces.TUIExtensionInfo;
+import com.tencent.qcloud.tuikit.timcommon.bean.TUIMessageBean;
+import com.tencent.qcloud.tuikit.timcommon.interfaces.ChatInputMoreListener;
+import com.tencent.qcloud.tuikit.timcommon.util.ActivityResultResolver;
+import com.tencent.qcloud.tuikit.tuichat.util.ChatMessageBuilder;
+
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import androidx.activity.result.ActivityResult;
+import androidx.activity.result.ActivityResultCallback;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentActivity;
+
+/**
+ * Author by pq, Date on 2023/7/10.
+ * 清单文件注册的ContentProvider
+ * 腾讯IM UI版本的群组聊天右上角按钮
+ */
+public class CustomChatInputMusicExtension extends ServiceInitializer implements ITUIExtension {
+    public static final int SELECT_MUSIC_REQUEST_CODE = 10001;
+
+    @Override
+    public void init(Context context) {
+        super.init(context);
+        TUICore.registerExtension(TUIConstants.TUIChat.Extension.InputMore.CLASSIC_EXTENSION_ID, this);
+    }
+
+    @Override
+    public List<TUIExtensionInfo> onGetExtension(String extensionID, Map<String, Object> param) {
+        if (TextUtils.equals(extensionID, TUIConstants.TUIChat.Extension.InputMore.CLASSIC_EXTENSION_ID)) {
+            Fragment fragment = (Fragment) param.get(TUIConstants.TUIChat.FRAGMENT);
+            ChatInputMoreListener chatInputMoreListener = (ChatInputMoreListener) param.get(TUIConstants.TUIChat.Extension.InputMore.INPUT_MORE_LISTENER);
+            //群聊
+            TUIExtensionInfo extensionInfo = new TUIExtensionInfo();
+            extensionInfo.setText("曲谱");
+            extensionInfo.setIcon(R.drawable.icon_group_fans);
+            extensionInfo.setExtensionListener(new TUIExtensionEventListener() {
+                @Override
+                public void onClicked(Map<String, Object> param) {
+                    LOG.i("startSelectMusic");
+//                    intent.putExtra("targetId",targetId);
+//                    intent.putExtra("conversationType",conversationType);
+                    if (fragment != null) {
+                        FragmentActivity activity = fragment.getActivity();
+                        if (activity == null) {
+                            return;
+                        }
+                        Intent intent = new Intent(fragment.getActivity(), SelectScoreChatActivity.class);
+                        TUICore.startActivityForResult(fragment.getActivity(), intent, new ActivityResultCallback<ActivityResult>() {
+                            @Override
+                            public void onActivityResult(ActivityResult result) {
+                                if(result == null){
+                                    return;
+                                }
+                                int resultCode = result.getResultCode();
+                                if (resultCode == Activity.RESULT_OK) {
+                                    Intent data = result.getData();
+                                    MusicSheetListBean.RowsBean rowsBean = data.getParcelableExtra("result");
+                                    if (rowsBean != null) {
+                                        TUIMessageBean msgBean = getMsgBean(rowsBean);
+                                        if (chatInputMoreListener != null) {
+                                            chatInputMoreListener.sendMessage(msgBean, null);
+                                        }
+                                    }
+                                }
+                            }
+                        });
+                    }
+                }
+            });
+            return Collections.singletonList(extensionInfo);
+        }
+        return null;
+    }
+
+    private TUIMessageBean getMsgBean(MusicSheetListBean.RowsBean item) {
+        TUIChatShareMusicMessageBean messageBean = new TUIChatShareMusicMessageBean();
+        messageBean.setSongName(item.musicSheetName);
+        messageBean.setSongAuth(item.composer);
+        messageBean.setMusicTagNames(item.musicSheetName);
+        messageBean.setTeacherAvatar(item.addUserAvatar);
+        messageBean.setTeacherName(item.addName);
+        messageBean.setSongId(item.id + "");
+        messageBean.setChargeType(item.chargeType);
+        messageBean.setBusinessID(TCMessageConstants.TC_CHAT_SHARE_MUSIC_MSG_TAG);
+        String data = GsonUtils.toJson(messageBean);
+        TUIMessageBean info = ChatMessageBuilder.buildCustomMessage(data, messageBean.onGetDisplayString(), messageBean.onGetDisplayString().getBytes());
+        return info;
+    }
+}

+ 9 - 0
chatModule/src/main/res/drawable/tc_chat_message_pop_left.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+
+    <corners android:radius="6dp" />
+<!--    <stroke android:color="#ECEBEB" android:width="1dp"/>-->
+    <solid android:color="@color/white"/>
+
+</shape>

+ 9 - 0
chatModule/src/main/res/drawable/tc_chat_message_pop_right.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+
+    <corners android:radius="6dp" />
+<!--    <stroke android:color="#ECEBEB" android:width="1dp"/>-->
+    <solid android:color="#D7EBFF"/>
+
+</shape>

+ 72 - 0
chatModule/src/main/res/layout/tc_activity_select_score_chat.xml

@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout 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:orientation="vertical">
+
+    <include
+        android:id="@+id/toolbar_include"
+        layout="@layout/common_toolbar_layout" />
+
+
+    <LinearLayout
+        android:layout_marginTop="10dp"
+        android:layout_width="match_parent"
+        android:layout_height="35dp"
+        android:layout_marginLeft="@dimen/dp_14"
+        android:layout_marginRight="@dimen/dp_14"
+        android:background="@drawable/bg_white_18dp"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+
+        <ImageView
+            android:id="@+id/iv_search_icon"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="12dp"
+            android:src="@drawable/icon_search" />
+
+        <EditText
+            android:id="@+id/et_target_name"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginRight="5dp"
+            android:layout_weight="1"
+            android:background="@null"
+            android:ellipsize="end"
+            android:hint="请输入曲谱名称"
+            android:inputType="text"
+            android:maxLines="1"
+            android:paddingLeft="8dp"
+            android:textColor="@color/color_333333"
+            android:textColorHint="@color/color_999999"
+            android:textSize="@dimen/sp_13" />
+
+        <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" />
+    </LinearLayout>
+
+    <com.scwang.smart.refresh.layout.SmartRefreshLayout
+        android:id="@+id/refreshLayout"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+
+
+        <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>
+</LinearLayout>

+ 104 - 0
chatModule/src/main/res/layout/tc_cl_layout_mine_score_item.xml

@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout 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="wrap_content">
+
+    <androidx.constraintlayout.widget.ConstraintLayout
+        android:id="@+id/constraintLayout"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="14dp"
+        android:layout_marginTop="12dp"
+        android:layout_marginRight="14dp"
+        android:background="@drawable/bg_white_10dp">
+
+        <ImageView
+            android:id="@+id/im_music_mark"
+            android:layout_width="@dimen/dp_40"
+            android:layout_height="@dimen/dp_40"
+            android:layout_marginLeft="11dp"
+            android:layout_marginTop="10dp"
+            android:background="@drawable/icon_music_mark"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <TextView
+            android:id="@+id/tv_name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="14dp"
+            android:text="Exodus(出埃及记)"
+            android:textColor="@color/black_333"
+            android:textSize="@dimen/sp_14"
+            android:textStyle="bold"
+            app:layout_constraintLeft_toRightOf="@+id/im_music_mark"
+            app:layout_constraintTop_toTopOf="@+id/im_music_mark" />
+
+        <TextView
+            android:id="@+id/tv_author_name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="14dp"
+            android:text="沃伊切赫·基拉尔"
+            app:layout_constraintBottom_toBottomOf="@+id/im_music_mark"
+            app:layout_constraintLeft_toRightOf="@+id/im_music_mark" />
+
+
+        <ImageView
+            android:id="@+id/im_state"
+            android:layout_width="@dimen/dp_55"
+            android:layout_height="@dimen/dp_22"
+            android:layout_marginRight="12dp"
+            android:background="@drawable/tc_icon_score_demand"
+            app:layout_constraintBottom_toBottomOf="@+id/im_music_mark"
+            app:layout_constraintRight_toRightOf="parent"
+            app:layout_constraintTop_toTopOf="@+id/im_music_mark" />
+
+        <View
+            android:id="@+id/view_line"
+            android:layout_width="match_parent"
+            android:layout_height="1dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginTop="10dp"
+            android:layout_marginRight="9dp"
+            android:background="@color/color_f2f2f2"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/im_music_mark" />
+
+        <de.hdodenhof.circleimageview.CircleImageView
+            android:id="@+id/im_header"
+            android:layout_width="18dp"
+            android:layout_height="18dp"
+            android:layout_marginLeft="14dp"
+            android:layout_marginTop="8dp"
+            android:layout_marginBottom="10dp"
+            android:src="@drawable/tc_icon_teacher_default_head"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintLeft_toLeftOf="@+id/view_line"
+            app:layout_constraintTop_toBottomOf="@+id/view_line"
+            app:layout_goneMarginLeft="20dp" />
+
+        <TextView
+            android:id="@+id/tv_teacher_name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="7dp"
+            android:text="宋倩倩"
+            android:textColor="@color/black_333"
+            android:textSize="@dimen/sp_12"
+            app:layout_constraintBottom_toBottomOf="@+id/im_header"
+            app:layout_constraintLeft_toRightOf="@+id/im_header"
+            app:layout_constraintTop_toTopOf="@+id/im_header" />
+
+        <androidx.recyclerview.widget.RecyclerView
+            android:id="@+id/rv_mark"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="8dp"
+            android:visibility="gone"
+            app:layout_constraintBottom_toBottomOf="@+id/tv_teacher_name"
+            app:layout_constraintLeft_toRightOf="@+id/tv_teacher_name"
+            app:layout_constraintTop_toTopOf="@+id/tv_teacher_name" />
+    </androidx.constraintlayout.widget.ConstraintLayout>
+</RelativeLayout>