Commit d7001ffe by 刘鹏

Merge branch 'fix/lp/fix_kefu' into 'release'

feat: 修复客服问题

See merge request app_android_lib/YDL-Component!189
parents 124a2e0a 689b45a1
...@@ -10,7 +10,7 @@ ext { ...@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.30.09", "m-fm" : "0.0.30.09",
"m-user" : "0.0.62.55", "m-user" : "0.0.62.55",
"m-home" : "0.0.23.95", "m-home" : "0.0.23.95",
"m-im" : "0.0.21.61", "m-im" : "0.0.21.62",
"m-dynamic" : "0.0.7.74", "m-dynamic" : "0.0.7.74",
"m-article" : "0.0.0.10", "m-article" : "0.0.0.10",
"m-muse" : "0.0.28.81", "m-muse" : "0.0.28.81",
...@@ -96,7 +96,7 @@ ext { ...@@ -96,7 +96,7 @@ ext {
"m-fm" : "0.0.30.09", "m-fm" : "0.0.30.09",
"m-user" : "0.0.62.55", "m-user" : "0.0.62.55",
"m-home" : "0.0.23.95", "m-home" : "0.0.23.95",
"m-im" : "0.0.21.61", "m-im" : "0.0.21.62",
"m-dynamic" : "0.0.7.74", "m-dynamic" : "0.0.7.74",
"m-article" : "0.0.0.10", "m-article" : "0.0.0.10",
......
...@@ -33,6 +33,7 @@ import com.ydl.audioim.http.command.NoticePushCommand ...@@ -33,6 +33,7 @@ import com.ydl.audioim.http.command.NoticePushCommand
import com.ydl.audioim.http.command.PayLoad import com.ydl.audioim.http.command.PayLoad
import com.ydl.audioim.player.AudioPlayer import com.ydl.audioim.player.AudioPlayer
import com.ydl.audioim.presenter.AudioHomePresenterImpl import com.ydl.audioim.presenter.AudioHomePresenterImpl
import com.ydl.audioim.router.AudioImIn
import com.ydl.audioim.utils.AudioLogUtils import com.ydl.audioim.utils.AudioLogUtils
import com.ydl.audioim.utils.DateUtils import com.ydl.audioim.utils.DateUtils
import com.ydl.audioim.utils.onConfideEvent import com.ydl.audioim.utils.onConfideEvent
...@@ -636,6 +637,9 @@ class AudioHomeActivity : ...@@ -636,6 +637,9 @@ class AudioHomeActivity :
private fun setClickEvent() { private fun setClickEvent() {
//跳转客服小壹 //跳转客服小壹
jump_kefu.setOnClickListener { jump_kefu.setOnClickListener {
if (!AudioImIn.getUserService().loginByOneKeyLogin(this@AudioHomeActivity,true)) {
return@setOnClickListener
}
val imService = ARouter.getInstance().navigation(IImService::class.java) val imService = ARouter.getInstance().navigation(IImService::class.java)
imService?.startKefuChat(this, "", 0, 0) imService?.startKefuChat(this, "", 0, 0)
} }
......
...@@ -4,6 +4,7 @@ import com.ydl.ydlcommon.modular.ModularServiceManager ...@@ -4,6 +4,7 @@ import com.ydl.ydlcommon.modular.ModularServiceManager
import com.yidianling.im.api.bean.IMRegisterObserverCustomNotificationCallBack import com.yidianling.im.api.bean.IMRegisterObserverCustomNotificationCallBack
import com.yidianling.im.api.bean.IMSendCustomNotificationResultCallBack import com.yidianling.im.api.bean.IMSendCustomNotificationResultCallBack
import com.yidianling.im.api.service.IImService import com.yidianling.im.api.service.IImService
import com.yidianling.user.api.service.IUserService
/** /**
...@@ -17,7 +18,9 @@ object AudioImIn { ...@@ -17,7 +18,9 @@ object AudioImIn {
private fun getImService(): IImService { private fun getImService(): IImService {
return ModularServiceManager.provide(IImService::class.java) return ModularServiceManager.provide(IImService::class.java)
} }
fun getUserService(): IUserService {
return ModularServiceManager.provide(IUserService::class.java)
}
/** /**
* 发送自定义通知 * 发送自定义通知
*/ */
......
...@@ -58,6 +58,7 @@ import com.ydl.ydlcommon.view.CircleImageView; ...@@ -58,6 +58,7 @@ import com.ydl.ydlcommon.view.CircleImageView;
import com.ydl.ydlcommon.view.dialog.CommonDialog; import com.ydl.ydlcommon.view.dialog.CommonDialog;
import com.yidianling.common.tools.ToastUtil; import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R; import com.yidianling.im.R;
import com.yidianling.im.config.constants.ImConstants;
import com.yidianling.im.event.CloseBottomWebviewEvent; import com.yidianling.im.event.CloseBottomWebviewEvent;
import com.yidianling.im.event.MultipleAnswerBean; import com.yidianling.im.event.MultipleAnswerBean;
import com.yidianling.im.event.MultipleSelectedEvent; import com.yidianling.im.event.MultipleSelectedEvent;
...@@ -322,22 +323,31 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -322,22 +323,31 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
ToastUtil.toastShort(throwable.getMessage()); ToastUtil.toastShort(throwable.getMessage());
}); });
} }
IP2PCustomActionHandler actionHandler = ActionHandlerStorage.getL(sessionId);
//是咨询师
boolean isExpert = null != actionHandler && actionHandler.getUserType() == 2;
//不是群聊
boolean notTeam = sessionType != SessionTypeEnum.Team;
//info信息
IP2PCustomActionHandler.DocInfo info = actionHandler.getInfo();
//不是客服
boolean notKefu = !ImConstants.KEFUXIAOYI.equals(sessionId);
if (isExpert && notTeam && info != null && notKefu && info.doctorId != null) {
String doctorId = info.doctorId;
ServiceImpl.Companion.getInstance().canViewConsult(doctorId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(response -> {
if (response.code.equals("200")) {
if (response.data != null && response.data.getCanViewConsult()) {
rela_zixun.setVisibility(View.VISIBLE);
}
}
}
);
}
boolean isExpert = null!=ActionHandlerStorage.getL(sessionId)&&ActionHandlerStorage.getL(sessionId).getUserType() == 2;
ServiceImpl.Companion.getInstance().canViewConsult(ActionHandlerStorage.getL(sessionId).getInfo().doctorId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(response -> {
if (response.code.equals("200")){
if (response.data!=null && response.data.getCanViewConsult()){
if (isExpert && sessionType != SessionTypeEnum.Team) {
rela_zixun.setVisibility(View.VISIBLE);
}
}
}
}
);
//有未完成订单或者有未评价订单时,显示订单布局 //有未完成订单或者有未评价订单时,显示订单布局
if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getInfo() != null) { if (ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getInfo() != null) {
......
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