Commit ebd09841 by upwork.021

feat: m-im组件代码优化,适配赠送对话新逻辑

parent 757358a8
......@@ -11,8 +11,7 @@ ext {
"m-user" : "0.0.61.90",
"m-user-medical" : "0.0.61.99",
"m-home" : "0.0.22.70",
"m-im-medical" : "0.0.21.30",
"m-im" : "0.0.20.76",
"m-im-medical" : "0.0.21.31",
"m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.10",
......@@ -97,8 +96,7 @@ ext {
"m-user" : "0.0.61.90",
"m-user-medical" : "0.0.61.99",
"m-home" : "0.0.22.70",
"m-im-medical" : "0.0.21.30",
"m-im" : "0.0.20.76",
"m-im-medical" : "0.0.21.31",
"m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.8",
......
......@@ -55,8 +55,6 @@ android {
//Flavor 信息
publishNonDefault true
productFlavors {
ydl {}
xlzx {}
medical{}
}
......
......@@ -4,19 +4,6 @@ modular {
// 模块发布需要的参数
publish {
modules {
xlzx {
groupId = "com.ydl"
artifactId = "m-im-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
ydl{
groupId = "com.ydl"
artifactId = "m-im-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号
version = rootProject.ext.ydlPublishVersion[childProject.getName()]
}
medical{
groupId = "com.ydl"
......
......@@ -2,6 +2,14 @@ package com.yidianling.im.bean
data class DoctorInquIryIngInfoBean(
var canDialog:Int, // 0不能对话、1赠送对话对话中、2问诊订单对话中
var dialogIng:Int, // 是否会话中:0不在会话中、1在会话中(问诊中状态包括待接诊、问诊中和已完成)
var dialogStatus:Int, // 对话状态:1问诊中(对话中),可对话时该字段才有值
var dialogStatusName:String, // 对话状态名称:1问诊中(对话中),可对话时该字段才有值
var surplusDialogTime:Long, // 剩余赠送对话时间
//问诊订单ID
val inquiryOrderId: String,
//问诊订单状态: 10:待支付、 20:待接诊、 30:待诊断(已接诊、问诊中)、40:已完成、50:已结束、60:已关闭
......
......@@ -37,37 +37,26 @@ import com.yidianling.im.session.extension.CustomAttachChatTipMsg;
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.CustomAttachLingXiJumpConfideList;
import com.yidianling.im.session.extension.CustomAttachLingxiAnswerQuestion;
import com.yidianling.im.session.extension.CustomAttachLingxiFirstQuestion;
import com.yidianling.im.session.extension.CustomAttachLingxiWhichQuestion;
import com.yidianling.im.session.extension.CustomAttachModifyTime;
import com.yidianling.im.session.extension.CustomAttachParser;
import com.yidianling.im.session.extension.CustomAttachPleaseSubscribeConsultDate;
import com.yidianling.im.session.extension.CustomAttachReceivedMoney;
import com.yidianling.im.session.extension.CustomAttachRedPacket;
import com.yidianling.im.session.extension.CustomAttachTipMsg;
import com.yidianling.im.session.extension.CustomAttachment;
import com.yidianling.im.session.extension.CustomAttachmentBusinessCard;
import com.yidianling.im.session.extension.CustomAttachmentConfirmOrder;
import com.yidianling.im.session.extension.CustomAttachmentEvaluate;
import com.yidianling.im.session.extension.CustomAttachmentFilter;
import com.yidianling.im.session.extension.CustomAttachmentInquiryEnd;
import com.yidianling.im.session.extension.CustomAttachmentInquiryReceive;
import com.yidianling.im.session.extension.CustomAttachmentInquiryStart;
import com.yidianling.im.session.extension.CustomAttachmentJumpToDaoYi;
import com.yidianling.im.session.extension.CustomAttachmentOrderAlreadyDone;
import com.yidianling.im.session.extension.CustomAttachmentOrderStatus;
import com.yidianling.im.session.extension.CustomAttachmentPhoneCallRedPacket;
import com.yidianling.im.session.extension.CustomAttachmentPhoneCallSystemNotice;
import com.yidianling.im.session.extension.CustomAttachmentReceivedSuccess;
import com.yidianling.im.session.extension.CustomAttachmentReceivedTimeout;
import com.yidianling.im.session.extension.CustomAttachmentRecipel;
import com.yidianling.im.session.extension.CustomAttachmentRecommendAssistant;
import com.yidianling.im.session.extension.CustomAttachmentRedStatus;
import com.yidianling.im.session.extension.CustomAttachmentShareMsg;
import com.yidianling.im.session.extension.CustomAttachmentSwitchKeFuTips;
import com.yidianling.im.session.extension.CustomAttachmentTest;
import com.yidianling.im.session.extension.CustomCustomerServiceCardAttachment;
import com.yidianling.im.session.extension.CustomRecommendExpertListMsg;
......@@ -76,12 +65,10 @@ import com.yidianling.im.session.extension.DefaultCustomAttachment;
import com.yidianling.im.session.extension.StickerAttachment;
import com.yidianling.im.session.viewholder.MsgViewHolderAVChat;
import com.yidianling.im.session.viewholder.MsgViewHolderAssistantReceivedMoney;
import com.yidianling.im.session.viewholder.MsgViewHolderBusinessCard;
import com.yidianling.im.session.viewholder.MsgViewHolderChatTip;
import com.yidianling.im.session.viewholder.MsgViewHolderConfirmOrder;
import com.yidianling.im.session.viewholder.MsgViewHolderConsult;
import com.yidianling.im.session.viewholder.MsgViewHolderConsultCallStatus;
import com.yidianling.im.session.viewholder.MsgViewHolderConsultSubScribe;
import com.yidianling.im.session.viewholder.MsgViewHolderCustomTip;
import com.yidianling.im.session.viewholder.MsgViewHolderCustomerServiceCard;
import com.yidianling.im.session.viewholder.MsgViewHolderDefCustom;
......@@ -89,7 +76,6 @@ import com.yidianling.im.session.viewholder.MsgViewHolderEvaluate;
import com.yidianling.im.session.viewholder.MsgViewHolderInquiryEnd;
import com.yidianling.im.session.viewholder.MsgViewHolderInquiryStart;
import com.yidianling.im.session.viewholder.MsgViewHolderInquiryreceive;
import com.yidianling.im.session.viewholder.MsgViewHolderJumpToDaoYi;
import com.yidianling.im.session.viewholder.MsgViewHolderLingXiJumpConfideList;
import com.yidianling.im.session.viewholder.MsgViewHolderLingxiAnswerQuestion;
import com.yidianling.im.session.viewholder.MsgViewHolderLingxiFirstQuestion;
......@@ -98,20 +84,13 @@ import com.yidianling.im.session.viewholder.MsgViewHolderModifyTime;
import com.yidianling.im.session.viewholder.MsgViewHolderOrderAlreadyDone;
import com.yidianling.im.session.viewholder.MsgViewHolderOrderStatus;
import com.yidianling.im.session.viewholder.MsgViewHolderPerfectConsultData;
import com.yidianling.im.session.viewholder.MsgViewHolderPhoneCallRedPacket;
import com.yidianling.im.session.viewholder.MsgViewHolderPhoneCallSystemNotice;
import com.yidianling.im.session.viewholder.MsgViewHolderPleaseSubscribeConsultDate;
import com.yidianling.im.session.viewholder.MsgViewHolderReceivedMoney;
import com.yidianling.im.session.viewholder.MsgViewHolderReceivedStatus;
import com.yidianling.im.session.viewholder.MsgViewHolderRecipel;
import com.yidianling.im.session.viewholder.MsgViewHolderRecommendAssistant;
import com.yidianling.im.session.viewholder.MsgViewHolderRecommendExpertList;
import com.yidianling.im.session.viewholder.MsgViewHolderRedPacket;
import com.yidianling.im.session.viewholder.MsgViewHolderRedStatus;
import com.yidianling.im.session.viewholder.MsgViewHolderSendTest;
import com.yidianling.im.session.viewholder.MsgViewHolderShareMsg;
import com.yidianling.im.session.viewholder.MsgViewHolderSticker;
import com.yidianling.im.session.viewholder.MsgViewHolderSwitchKeFuTips;
import com.yidianling.im.session.viewholder.MsgViewHolderSystemTips;
import com.yidianling.im.session.viewholder.MsgViewHolderTip;
import com.yidianling.im.ui.param.BuryRedPointParam;
......
......@@ -52,7 +52,8 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
protected YDLMessageFragment messageFragment;
private boolean isChangeDoctor = false;
String oldName = "";
private final int MESSAGE_TYPE = 91;
private final int MESSAGE_TYPE_END_INQUIRY = 91; // 结束问诊
private final int MESSAGE_TYPE_END_TALK = 92; // 结束对话
/**
* @param context
......@@ -223,8 +224,10 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
try {
Type91Bean type91Bean = new Gson().fromJson(content, Type91Bean.class);
if (type91Bean.getType() == MESSAGE_TYPE) {
messageFragment.upReceiceType(type91Bean.getData().getStatus(),type91Bean.getData().getStatusName(),type91Bean.getData().getSurplusInquiryTime());
if (type91Bean.getType() == MESSAGE_TYPE_END_INQUIRY) {
messageFragment.upReceiveType(type91Bean.getData().getStatus(),type91Bean.getData().getStatusName(),type91Bean.getData().getSurplusInquiryTime());
}else if (type91Bean.getType() == MESSAGE_TYPE_END_TALK){
messageFragment.upReceiveType(type91Bean.getData().getStatus(),type91Bean.getData().getStatusName(),0L);
}
} catch (Exception e) {
......
......@@ -492,7 +492,14 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
.observeOn(AndroidSchedulers.mainThread())
.subscribe(response -> {
if ("200".equals(response.code)) {
upReceiceType(response.data.getStatus(), response.data.getStatusName(), response.data.getSurplusInquiryTime());
if (response.data.getCanDialog()==0){ // 不在会话中
inputPanel.setVisible(false);
top_expert_info_ll.setVisibility(View.GONE);
}else if (response.data.getCanDialog()==1){ // 赠送对话对话中
upReceiveType(30, response.data.getDialogStatusName(), response.data.getSurplusDialogTime());
}else {
upReceiveType(response.data.getStatus(), response.data.getStatusName(), response.data.getSurplusInquiryTime());
}
} else {
ToastUtil.toastShort(response.msg);
......@@ -510,8 +517,13 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
);
}
public void upReceiceType(int type, String statusName, Long time) {
/**
* 问诊中
* @param type
* @param statusName
* @param time
*/
public void upReceiveType(int type, String statusName, Long time) {
if (ActionHandlerStorage.getL(sessionId).getUserType() == USER_TYPE_EXPERT) {
if (type == 30) {
// 30:待诊断(已接诊、问诊中)
......
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