Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
560634fe
Commit
560634fe
authored
Jun 25, 2021
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:im-灵犀2.0-回答问题接口
parent
3616e775
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
85 additions
and
1 deletions
+85
-1
SessionHelper.java
m-im/src/main/java/com/yidianling/im/session/SessionHelper.java
+3
-0
CustomAttachLingxiAnswerQuestion.java
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachLingxiAnswerQuestion.java
+26
-0
CustomAttachParser.java
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachParser.java
+3
-0
CustomAttachmentType.java
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachmentType.java
+3
-1
MsgViewHolderLingxiAnswerQuestion.java
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiAnswerQuestion.java
+35
-0
im_nim_lingxi_answer_question.xml
m-im/src/main/res/layout/im_nim_lingxi_answer_question.xml
+14
-0
colors.xml
m-im/src/main/res/values/colors.xml
+1
-0
No files found.
m-im/src/main/java/com/yidianling/im/session/SessionHelper.java
View file @
560634fe
...
...
@@ -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-回答问题
}
...
...
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachLingxiAnswerQuestion.java
0 → 100644
View file @
560634fe
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
;
}
}
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachParser.java
View file @
560634fe
...
...
@@ -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
;
...
...
m-im/src/main/java/com/yidianling/im/session/extension/CustomAttachmentType.java
View file @
560634fe
...
...
@@ -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
;
//回答消息
}
m-im/src/main/java/com/yidianling/im/session/viewholder/MsgViewHolderLingxiAnswerQuestion.java
0 → 100644
View file @
560634fe
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
()
{
}
}
m-im/src/main/res/layout/im_nim_lingxi_answer_question.xml
0 → 100644
View file @
560634fe
<?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
m-im/src/main/res/values/colors.xml
View file @
560634fe
...
...
@@ -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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment