Commit 560634fe by 霍志良

feat:im-灵犀2.0-回答问题接口

parent 3616e775
......@@ -44,6 +44,7 @@ import com.yidianling.im.session.extension.CustomAttachConsult;
import com.yidianling.im.session.extension.CustomAttachConsultCallStatus;
import com.yidianling.im.session.extension.CustomAttachConsultPerfectData;
import com.yidianling.im.session.extension.CustomAttachConsultSubScript;
import com.yidianling.im.session.extension.CustomAttachLingxiAnswerQuestion;
import com.yidianling.im.session.extension.CustomAttachLingxiWhichQuestion;
import com.yidianling.im.session.extension.CustomAttachModifyTime;
import com.yidianling.im.session.extension.CustomAttachParser;
......@@ -87,6 +88,7 @@ import com.yidianling.im.session.viewholder.MsgViewHolderCustomerServiceCard;
import com.yidianling.im.session.viewholder.MsgViewHolderDefCustom;
import com.yidianling.im.session.viewholder.MsgViewHolderEvaluate;
import com.yidianling.im.session.viewholder.MsgViewHolderJumpToDaoYi;
import com.yidianling.im.session.viewholder.MsgViewHolderLingxiAnswerQuestion;
import com.yidianling.im.session.viewholder.MsgViewHolderLingxiWhichQuestion;
import com.yidianling.im.session.viewholder.MsgViewHolderModifyTime;
import com.yidianling.im.session.viewholder.MsgViewHolderOrderAlreadyDone;
......@@ -468,6 +470,7 @@ public class SessionHelper {
NimUIKit.registerMsgItemViewHolder(CustomAttachmentConfirmOrder.class, MsgViewHolderConfirmOrder.class);//确认完成订单消息类型38
NimUIKit.registerMsgItemViewHolder(CustomAttachmentOrderAlreadyDone.class, MsgViewHolderOrderAlreadyDone.class);//已完成订单消息类型39
NimUIKit.registerMsgItemViewHolder(CustomAttachLingxiWhichQuestion.class, MsgViewHolderLingxiWhichQuestion.class);//灵犀2.0-您想要咨询下列哪些问题
NimUIKit.registerMsgItemViewHolder(CustomAttachLingxiAnswerQuestion.class, MsgViewHolderLingxiAnswerQuestion.class);//灵犀2.0-回答问题
}
......
package com.yidianling.im.session.extension;
import com.alibaba.fastjson.JSONObject;
public class CustomAttachLingxiAnswerQuestion extends CustomAttachment{
private final String QUESTIONPAPERID = "questionPaperId";//试卷id
public String questionPaperId;
public CustomAttachLingxiAnswerQuestion() {
super(CustomAttachmentType.TYPE_LINGXI_ANSWER_QUESTION);
}
@Override
protected void parseData(JSONObject data) {
this.questionPaperId = data.getString(QUESTIONPAPERID);
}
@Override
protected JSONObject packData() {
JSONObject data = new JSONObject();
data.put(QUESTIONPAPERID, questionPaperId);
return data;
}
}
......@@ -144,6 +144,9 @@ public class CustomAttachParser implements MsgAttachmentParser {
case CustomAttachmentType.TYPE_LINGXI_WHICH_QUESTION://灵犀2.0-您想要咨询下列哪些问题
attachment=new CustomAttachLingxiWhichQuestion();
break;
case CustomAttachmentType.TYPE_LINGXI_ANSWER_QUESTION://灵犀2.0-回答问题
attachment=new CustomAttachLingxiAnswerQuestion();
break;
default:
attachment = new DefaultCustomAttachment();
break;
......
......@@ -44,6 +44,8 @@ public interface CustomAttachmentType {
int TYPE_ORDER_ALREADY_DONE=39;//已完成订单
//灵犀2.0问诊数据
int TYPE_LINGXI_WHICH_QUESTION=55;//您想要咨询哪类问题
int TYPE_LINGXI_WHICH_QUESTION=55;//试卷消息
int TYPE_LINGXI_ANSWER_QUESTION=56;//回答消息
}
package com.yidianling.im.session.viewholder;
import android.view.Gravity;
import com.yidianling.im.R;
import com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter;
import com.yidianling.uikit.business.session.viewholder.MsgViewHolderBase;
public class MsgViewHolderLingxiAnswerQuestion extends MsgViewHolderBase {
public MsgViewHolderLingxiAnswerQuestion(BaseMultiItemFetchLoadAdapter adapter) {
super(adapter);
}
@Override
protected int getContentResId() {
return R.layout.im_nim_lingxi_answer_question;
}
@Override
protected void inflateContentView() {
}
@Override
protected boolean isReceivedMessage() {
return false;
}
@Override
protected void bindContentView() {
}
}
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="aaa"
android:background="@color/color_c2e7ff"
android:id="@+id/answer_question"
android:paddingTop="@dimen/platform_dp_9"
android:paddingBottom="@dimen/platform_dp_9"
android:paddingStart="@dimen/platform_dp_10"
android:paddingEnd="@dimen/platform_dp_10"
>
</TextView>
\ No newline at end of file
......@@ -59,4 +59,5 @@
<color name="im_color_grey_d0d0d0">#d0d0d0</color>
<color name="color_9f9f9f">#9f9f9f</color>
<color name="color_666666">#666666</color>
<color name="color_c2e7ff">#c2e7ff</color>
</resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment