Commit 14967758 by YKai

feat: 导医bug修复

parent 0dd477c6
......@@ -8,9 +8,9 @@ ext {
"m-confide" : "0.0.49.10",
"m-consultant" : "0.0.59.91",
"m-fm" : "0.0.30.03",
"m-user-medical" : "0.0.62.05",
"m-user-medical" : "0.0.62.14",
"m-home" : "0.0.22.70",
"m-im-medical" : "0.0.21.42",
"m-im-medical" : "0.0.21.43",
"m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.10",
......@@ -92,9 +92,9 @@ ext {
"m-confide" : "0.0.49.10",
"m-consultant" : "0.0.59.91",
"m-fm" : "0.0.30.01",
"m-user-medical" : "0.0.62.05",
"m-user-medical" : "0.0.62.14",
"m-home" : "0.0.22.70",
"m-im-medical" : "0.0.21.42",
"m-im-medical" : "0.0.21.43",
"m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.8",
......
......@@ -94,7 +94,7 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
private DocInfo docInfo = new DocInfo();
private Activity mActivity;
private int blackStatus;
private int userType;
private int userType=0;
/***是否来自倾述页面*/
public int isFromQingShu = 0;
......
......@@ -20,8 +20,6 @@ import com.ydl.ydlcommon.ui.LoadingDialogFragment.Companion.newInstance
import com.ydl.ydlcommon.utils.NetworkParamsUtils
import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.utils.UserInfoCache
import com.ydl.ydlcommon.utils.log.AliYunLogConfig
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.remind.HttpErrorUtils.Companion.handleError
import com.ydl.ydlcommon.view.dialog.CommonDialog
import com.yidianling.common.tools.LogUtil
......@@ -29,7 +27,6 @@ import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.R
import com.yidianling.im.api.bean.IMExpertBuild
import com.yidianling.im.bean.GetExpert
import com.yidianling.im.bean.UserTypeBean
import com.yidianling.im.bridge.P2PCustomActionHandlerImpl
import com.yidianling.im.config.constants.ImConstants
import com.yidianling.im.http.ImRetrofitApi
......@@ -40,8 +37,8 @@ import com.yidianling.im.router.ImIn.isLogin
import com.yidianling.im.session.SessionHelper
import com.yidianling.im.ui.activity.CmsExamQuestionPaperActivity
import com.yidianling.im.ui.page.fragment.bean.ChatItemBean
import com.yidianling.uikit.business.session.activity.YDLP2PMessageActivity
import com.yidianling.uikit.business.session.fragment.YDLMessageFragment
import com.yidianling.uikit.business.session.helper.ChatStatusCacheHelper
import com.yidianling.uikit.custom.bridge.ActionHandlerStorage
import com.yidianling.uikit.custom.bridge.IP2PCustomActionHandler
import com.yidianling.uikit.custom.http.ServiceImpl.Companion.instance
......@@ -248,8 +245,6 @@ object IMChatUtil {
isFromQingShu: Int,
context: AppCompatActivity
) {
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "startChatSession 开启聊天会话")
val p2PCustomActionHandlerImpl = P2PCustomActionHandlerImpl(toUid, expertInfo)
p2PCustomActionHandlerImpl.isFromQingShu = isFromQingShu
SessionHelper.startP2PSession(
......@@ -346,8 +341,7 @@ object IMChatUtil {
listener: ChatDataRequestListener
) {
val cmd = GetExpert(toUid.toInt(), 0)
val disposable =
getImRetrofitApi().getExpert(NetworkParamsUtils.getMaps(cmd))
val disposable = getImRetrofitApi().getExpert(NetworkParamsUtils.getMaps(cmd))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ resp: BaseResponse<IMExpertBuild> ->
......@@ -364,13 +358,17 @@ object IMChatUtil {
listener.onSuccess(expert)
} else {
upLoadLog("consult/get-expert", resp.code, resp.msg)
if (resp.code == ImConstants.HTTP_CODE_UNLOGIN) {
ImIn.loginByOneKeyLogin(context, true)
ToastUtil.toastShort(resp.msg)
} else if (resp.code == ImConstants.SILENCED_CODE) { //禁言
showSilencedDialog(context, resp.data.tips, resp.data.url)
} else {
ToastUtil.toastShort(resp.msg)
when (resp.code) {
ImConstants.HTTP_CODE_UNLOGIN -> {
ImIn.loginByOneKeyLogin(context, true)
ToastUtil.toastShort(resp.msg)
}
ImConstants.SILENCED_CODE -> { //禁言
showSilencedDialog(context, resp.data.tips, resp.data.url)
}
else -> {
ToastUtil.toastShort(resp.msg)
}
}
}
}
......
......@@ -41,6 +41,7 @@ import com.netease.nimlib.sdk.msg.model.MessageReceipt;
import com.ydl.ydlcommon.data.http.RxUtils;
import com.ydl.ydlcommon.modular.ModularServiceManager;
import com.ydl.ydlcommon.utils.LogUtil;
import com.ydl.ydlcommon.utils.NetworkParamsUtils;
import com.ydl.ydlcommon.utils.SharedPreferencesEditor;
import com.ydl.ydlcommon.utils.log.AliYunLogConfig;
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper;
......@@ -48,6 +49,7 @@ import com.ydl.ydlcommon.utils.log.LogHelper;
import com.ydl.ydlcommon.view.dialog.CommonDialog;
import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R;
import com.yidianling.im.bean.GetExpert;
import com.yidianling.im.event.MultipleAnswerBean;
import com.yidianling.im.event.MultipleSelectedEvent;
import com.yidianling.im.helper.IMChatUtil;
......@@ -69,6 +71,7 @@ import com.yidianling.nimbase.common.fragment.TFragment;
import com.yidianling.uikit.api.NimUIKitImpl;
import com.yidianling.uikit.business.ait.AitManager;
import com.yidianling.uikit.business.session.activity.YDLBaseMessageActivity;
import com.yidianling.uikit.business.session.activity.YDLP2PMessageActivity;
import com.yidianling.uikit.business.session.helper.ChatStatusCacheHelper;
import com.yidianling.uikit.business.session.module.input.InputPanel;
import com.yidianling.uikit.business.session.module.list.MessageListPanelEx;
......@@ -480,8 +483,12 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
if (ActionHandlerStorage.getL(sessionId).getUserType() == USER_TYPE_EXPERT) {
inputPanel.setVisible(false);
}
if (ActionHandlerStorage.getL(sessionId).getUserType() == USER_TYPE_ASSISTANT){
inputPanel.setVisible(true);
}else {
getInquIryIngInfo();
}
getInquIryIngInfo();
}
@SuppressLint("CheckResult")
......@@ -517,6 +524,22 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
);
}
// @SuppressLint("CheckResult")
// private void userType(){
// GetExpert getExpert = new GetExpert(Integer.parseInt(ActionHandlerStorage.getL(sessionId).getInfo().toUid), 0);
// ImRetrofitApi.Companion.getImRetrofitApi().getExpert(NetworkParamsUtils.getMaps(getExpert))
// .subscribeOn(Schedulers.io())
// .observeOn(AndroidSchedulers.mainThread())
// .subscribe(response->{
// if (response.data.shareData.user_type==USER_TYPE_ASSISTANT){
// inputPanel.setVisible(true);
// }else {
// getInquIryIngInfo();
// }
// },throwable -> {});
// }
/**
* 问诊中
* @param type
......
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