Commit ca1d57b5 by 刘鹏

feat : IM区分用户类型2、3

parent d8462f95
...@@ -10,7 +10,7 @@ ext { ...@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.30.03", "m-fm" : "0.0.30.03",
"m-user" : "0.0.61.84", "m-user" : "0.0.61.84",
"m-home" : "0.0.22.70", "m-home" : "0.0.22.70",
"m-im" : "0.0.20.38", "m-im" : "0.0.20.41",
"m-dynamic" : "0.0.7.28", "m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.10", "m-article" : "0.0.0.10",
...@@ -94,7 +94,7 @@ ext { ...@@ -94,7 +94,7 @@ ext {
"m-fm" : "0.0.30.01", "m-fm" : "0.0.30.01",
"m-user" : "0.0.61.84", "m-user" : "0.0.61.84",
"m-home" : "0.0.22.70", "m-home" : "0.0.22.70",
"m-im" : "0.0.20.38", "m-im" : "0.0.20.41",
"m-dynamic" : "0.0.7.28", "m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.8", "m-article" : "0.0.0.8",
......
...@@ -144,7 +144,7 @@ object IMChatUtil { ...@@ -144,7 +144,7 @@ object IMChatUtil {
fun startChat(context: AppCompatActivity?, chatItemBean: ChatItemBean) { fun startChat(context: AppCompatActivity?, chatItemBean: ChatItemBean) {
SessionHelper.startP2PSession( SessionHelper.startP2PSession(
context, context,
3, chatItemBean.utype,
chatItemBean.toUid.toString(), chatItemBean.toUid.toString(),
null, null,
P2PCustomActionHandlerImpl(chatItemBean) P2PCustomActionHandlerImpl(chatItemBean)
...@@ -254,7 +254,7 @@ object IMChatUtil { ...@@ -254,7 +254,7 @@ object IMChatUtil {
p2PCustomActionHandlerImpl.isFromQingShu = isFromQingShu p2PCustomActionHandlerImpl.isFromQingShu = isFromQingShu
SessionHelper.startP2PSession( SessionHelper.startP2PSession(
context, context,
3, expertInfo.shareData.user_type,
toUid, toUid,
null, null,
p2PCustomActionHandlerImpl p2PCustomActionHandlerImpl
......
...@@ -32,7 +32,6 @@ import com.yidianling.im.http.ImRetrofitApi; ...@@ -32,7 +32,6 @@ import com.yidianling.im.http.ImRetrofitApi;
import com.yidianling.im.router.ImIn; import com.yidianling.im.router.ImIn;
import com.yidianling.im.session.action.AVChatAction; import com.yidianling.im.session.action.AVChatAction;
import com.yidianling.im.session.action.H5VideoAction; import com.yidianling.im.session.action.H5VideoAction;
import com.yidianling.im.session.action.HelpAction;
import com.yidianling.im.session.action.MakeCollectionsAction; import com.yidianling.im.session.action.MakeCollectionsAction;
import com.yidianling.im.session.action.OrderAction; import com.yidianling.im.session.action.OrderAction;
import com.yidianling.im.session.action.RedPacketAction; import com.yidianling.im.session.action.RedPacketAction;
...@@ -169,6 +168,10 @@ public class SessionHelper { ...@@ -169,6 +168,10 @@ public class SessionHelper {
setSessionListener(); setSessionListener();
} }
/**
* user_type 2 医生
* 3 导医
*/
public static void startP2PSession(Context context, int user_type, String account, IMMessage anchor, IP2PCustomActionHandler actionHandler) { public static void startP2PSession(Context context, int user_type, String account, IMMessage anchor, IP2PCustomActionHandler actionHandler) {
LogHelper.Companion.getInstance().writeLogSync("开启聊天:" LogHelper.Companion.getInstance().writeLogSync("开启聊天:"
+ "user_type = " + user_type + "user_type = " + user_type
...@@ -233,8 +236,8 @@ public class SessionHelper { ...@@ -233,8 +236,8 @@ public class SessionHelper {
/* /*
* 通知服务端红点 * 通知服务端红点
* */ * */
private static void notifyRedPoint( String assistantUid, String userId) { private static void notifyRedPoint(String assistantUid, String userId) {
String str = new Gson().toJson(new BuryRedPointParam(assistantUid, userId)); String str = new Gson().toJson(new BuryRedPointParam(assistantUid, userId));
RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), str); RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), str);
Disposable subscribe = ImRetrofitApi.Companion.getImRetrofitApi().imBuryRedPoints(body) Disposable subscribe = ImRetrofitApi.Companion.getImRetrofitApi().imBuryRedPoints(body)
.compose(RxUtils.INSTANCE.resultJavaData()) .compose(RxUtils.INSTANCE.resultJavaData())
......
...@@ -78,6 +78,9 @@ public interface IP2PCustomActionHandler { ...@@ -78,6 +78,9 @@ public interface IP2PCustomActionHandler {
void pauseUm(Activity activity); void pauseUm(Activity activity);
/**
* 1:用户 2:医生 3:导医
* */
int getUserType(); int getUserType();
/** /**
......
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