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
13d2b66c
Commit
13d2b66c
authored
Mar 03, 2020
by
严久程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
im 私聊问题修复,flutter升级
parent
d5f38fd5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
99 deletions
+18
-99
config.gradle
config.gradle
+4
-4
IMUtil.java
m-im/src/main/java/com/yidianling/im/helper/IMUtil.java
+14
-95
No files found.
config.gradle
View file @
13d2b66c
ext
{
kotlin_version
=
"1.3.21"
dev_mode
=
tru
e
dev_mode
=
fals
e
ydl_app
=
[
appName
:
"心理咨询壹点灵"
,
...
...
@@ -47,7 +47,7 @@ ext {
"m-fm"
:
"0.0.28"
,
"m-user"
:
"0.0.58.2"
,
"m-home"
:
"0.0.19.1"
,
"m-im"
:
"0.0.1
4.4
"
,
"m-im"
:
"0.0.1
5.2
"
,
"m-dynamic"
:
"0.0.6.1"
,
"m-muse"
:
"0.0.27"
,
...
...
@@ -76,7 +76,7 @@ ext {
"ydl-media"
:
"0.0.20"
,
"ydl-pay"
:
"0.0.17"
,
"m-audioim"
:
"0.0.46.5"
,
"ydl-flutter-base"
:
"0.0.10"
,
"ydl-flutter-base"
:
"0.0.10
.4
"
,
//以下 几乎不会动
"router"
:
"0.0.1"
,
...
...
@@ -270,7 +270,7 @@ ext {
//flutter功能组件升级===>发布ydl-flutter组件===>引用flutter相关的业务模块
"ydl-flutter-base"
:
"com.ydl:ydl-flutter-base:${ydlCompileVersion["
ydl
-
flutter
-
base
"]}"
,
//组件化项目中的flutter base模块
"ydl-flutter"
:
"com.ydl:ydl-flutter:0.0.1
6.9
@aar"
,
//flutter aar
"ydl-flutter"
:
"com.ydl:ydl-flutter:0.0.1
7.0
@aar"
,
//flutter aar
"ydl-flutter-sp"
:
"com.ydl:ydl-flutter-sp:0.0.2@aar"
,
//flutter 缓存 aar
//基础组件 <<--- 先发这个,发完改这里的版本号
...
...
m-im/src/main/java/com/yidianling/im/helper/IMUtil.java
View file @
13d2b66c
...
...
@@ -86,9 +86,6 @@ public class IMUtil {
GetExpert
cmd
=
new
GetExpert
(
Integer
.
parseInt
(
toUid
),
canTalk
);
if
(
isFromMessageList
)
{
//先根据uid判断用户类型:专家调一个接口,非专家调另外的接口
ImRetrofitApi
.
Companion
.
getImJavaApi
().
getUserType
(
toUid
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
...
...
@@ -101,13 +98,11 @@ public class IMUtil {
ChatStatusCacheHelper
.
setStatusCache
(
"collectEvent"
,
res
.
data
.
getCollectEvent
());
}
if
(
TextUtils
.
equals
(
res
.
data
.
getUserType
(),
"2"
))
{
//专家 java 接口
//如果是从消息列表点击进来的,那么专家还是专家,助理还是助理,不走其他所有逻辑(比如销售代运营)
if
(
TextUtils
.
equals
(
res
.
data
.
getUserType
(),
"2"
))
{
//专家
if
(
isFromMessageList
)
{
startExpertChat
(
context
,
toUid
,
dialog
,
listener
,
isUseUm
,
isSaveUserInfo
,
isFromQingShu
);
return
;
}
//在uid用户类型确定为专家的情况下,根据uid调用接口判断是进入专家私聊还是助理私聊
ImRetrofitApi
.
Companion
.
getImJavaApi
().
getChatUid
((
toUid
))
.
subscribeOn
(
Schedulers
.
io
())
...
...
@@ -115,42 +110,6 @@ public class IMUtil {
.
subscribe
(
resp
->
{
DoctorAssistantRespDtoBean
bean
=
resp
.
data
;
if
(
bean
.
getRole
()
==
1
)
{
//接口返回值是专家,java接口
startExpertChat
(
context
,
bean
.
getChatUid
(),
dialog
,
listener
,
isUseUm
,
isSaveUserInfo
,
isFromQingShu
);
}
else
{
GetExpert
cmd1
=
new
GetExpert
(
Integer
.
parseInt
(
bean
.
getChatUid
()),
canTalk
);
//接口返回值是助理,php接口
startAssistantChat
(
context
,
bean
.
getChatUid
(),
cmd1
,
dialog
,
listener
,
isUseUm
,
isSaveUserInfo
,
isFromQingShu
);
}
},
t
->
{
HttpErrorUtils
.
Companion
.
handleError
(
context
,
t
);
});
}
else
{
//非专家 php接口
startAssistantChat
(
context
,
toUid
,
cmd
,
dialog
,
listener
,
isUseUm
,
isSaveUserInfo
,
isFromQingShu
);
}
}
else
{
if
(
dialog
.
isVisible
())
{
dialog
.
dismissAllowingStateLoss
();
}
ToastUtil
.
toastShort
(
res
.
msg
);
}
},
throwable
->
{
if
(
dialog
.
isVisible
())
{
dialog
.
dismissAllowingStateLoss
();
}
HttpErrorUtils
.
Companion
.
handleError
(
context
,
throwable
);
});
}
else
{
ImRetrofitApi
.
Companion
.
getImJavaApi
().
getChatUid
(
toUid
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
getChatUidResp
->
{
DoctorAssistantRespDtoBean
bean
=
getChatUidResp
.
data
;
ImRetrofitApi
.
Companion
.
getImJavaApi
().
getUserType
(
bean
.
chatUid
)
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
...
...
@@ -187,64 +146,24 @@ public class IMUtil {
});
},
t
->
{
HttpErrorUtils
.
Companion
.
handleError
(
context
,
t
);
});
}
else
{
startAssistantChat
(
context
,
toUid
,
cmd
,
dialog
,
listener
,
isUseUm
,
isSaveUserInfo
,
isFromQingShu
);
}
}
else
{
if
(
dialog
.
isVisible
())
{
dialog
.
dismissAllowingStateLoss
();
}
HttpErrorUtils
.
Companion
.
handleError
(
context
,
t
);
});
ToastUtil
.
toastShort
(
res
.
msg
);
}
// //先根据uid判断用户类型:专家调一个接口,非专家调另外的接口
// Disposable disposable = ImRetrofitApi.Companion.getImJavaApi().getUserType(toUid)
// .subscribeOn(Schedulers.io())
// .observeOn(AndroidSchedulers.mainThread())
// .subscribe(res -> {
// if (res.code == 200) {
// if (TextUtils.equals(res.data, "2")) {//专家 java 接口
//
// //如果是从消息列表点击进来的,那么专家还是专家,助理还是助理,不走其他所有逻辑(比如销售代运营)
// if (isFromMessageList) {
// startExpertChat(context, toUid, dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
// return ;
// }
//
// //在uid用户类型确定为专家的情况下,根据uid调用接口判断是进入专家私聊还是助理私聊
// Disposable disposa = ImRetrofitApi.Companion.getImJavaApi().getChatUid((toUid))
// .subscribeOn(Schedulers.io())
// .observeOn(AndroidSchedulers.mainThread())
// .subscribe(resp -> {
//
// DoctorAssistantRespDtoBean bean = resp.data;
// if (bean.getRole() == 1) {
// //接口返回值是专家,java接口
// startExpertChat(context, bean.getChatUid(), dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
// }else {
//
// GetExpert cmd1 = new GetExpert(Integer.parseInt(bean.getChatUid()), canTalk);
// //接口返回值是助理,php接口
// startAssistantChat(context, bean.getChatUid(), cmd1, dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
// }
//
// },t->{
// HttpErrorUtils.Companion.handleError(context, t);
// });
// } else {//非专家 php接口
// startAssistantChat(context, toUid, cmd, dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
// }
// } else {
// if (dialog.isVisible()) {
// dialog.dismissAllowingStateLoss();
// }
// ToastUtil.toastShort(res.msg);
// }
// }, throwable -> {
// if (dialog.isVisible()) {
// dialog.dismissAllowingStateLoss();
// }
// HttpErrorUtils.Companion.handleError(context, throwable);
// });
},
throwable
->
{
if
(
dialog
.
isVisible
())
{
dialog
.
dismissAllowingStateLoss
();
}
HttpErrorUtils
.
Companion
.
handleError
(
context
,
throwable
);
});
}
/**
...
...
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