Commit dd01e2b0 by YKai

Merge remote-tracking branch 'origin/4.1.69(强绑手机号)' into 4.1.69(强绑手机号)

parents 0e274878 d1b3325e
......@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.30.01",
"m-user" : "0.0.61.11",
"m-home" : "0.0.22.53",
"m-im" : "0.0.18.35",
"m-im" : "0.0.18.39",
"m-dynamic" : "0.0.7.19",
"m-article" : "0.0.0.6",
......@@ -93,7 +93,7 @@ ext {
"m-fm" : "0.0.30.01",
"m-user" : "0.0.61.11",
"m-home" : "0.0.22.54",
"m-im" : "0.0.18.34",
"m-im" : "0.0.18.39",
"m-dynamic" : "0.0.7.19",
"m-article" : "0.0.0.6",
......
......@@ -92,13 +92,15 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
private Activity mActivity;
private int blackStatus;
private int userType;
public int isFromQingShu = 0;//是否来自倾述页面
/***是否来自倾述页面*/
public int isFromQingShu = 0;
public P2PCustomActionHandlerImpl(String toChatUsername,
IMExpertBuild expert) {
setExpertInfo(toChatUsername, expert);
}
@Override
public void setExpertInfo(String toChatUsername, IMExpertBuild expert) {
blackStatus = Integer.valueOf(expert.shareData.blackStatus);
this.toChatUsername = toChatUsername;
......@@ -169,12 +171,16 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
docInfo.cover = chatItemBean.getHead();
}
//聊天室使用
/**
* 聊天室使用
*/
public P2PCustomActionHandlerImpl() {
}
//群聊使用
/**
* 群聊使用
*/
public P2PCustomActionHandlerImpl(String doctorId) {
docInfo.doctorId = doctorId;
}
......@@ -184,6 +190,7 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
return userType;
}
@Override
public void setUserType(int userType) {
this.userType = userType;
}
......@@ -193,7 +200,9 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
return ImIn.INSTANCE.getUserInfo().getUser_type();
}
//发红包
/**
* 发红包
*/
@Override
public void sendRedPacket(Activity activity) {
// Bundle bundle = new Bundle();
......@@ -202,7 +211,9 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
ImIn.INSTANCE.sendRedPacketIntent(activity, toChatUsername, 44);
}
//判定是否是今天第一次发送提醒上线通知,不是的话则不发消息通知|普通消息
/**
* 判定是否是今天第一次发送提醒上线通知,不是的话则不发消息通知|普通消息
*/
@Override
public void judgeSendRemindMsg(String sessionId) {
if (!TextUtils.isEmpty(YDLCacheUtils.Companion.getRemindTime(sessionId))) {
......@@ -237,7 +248,9 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
ToastUtil.toastShort("已提醒");
}
//发送专家推荐列表自定义消息
/**
* 发送专家推荐列表自定义消息
*/
@Override
public void sendRecommendExpertListMessage(String sessionId, ArrayList<RecommendExpertBean> recommendExpertList, int type, boolean showExpertList) {
......@@ -250,7 +263,10 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
NIMClient.getService(MsgService.class).saveMessageToLocal(message, true);
}
//跳转到专家主页
/**
* 跳转到专家主页
*/
@Override
public void toExpertHome(String doctorId, String name, String cover) {
// 跳转到专家主页
String junmpurl = ImIn.INSTANCE.getExpertHost() + doctorId;
......@@ -270,7 +286,9 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
}
}
//检查用户是否绑定手机
/**
* 检查用户是否绑定手机
*/
@Override
public boolean isBindPhone(final Activity activity, String toUid) {
//小壹特殊处理,没有绑定也可以和小壹聊天
......@@ -336,7 +354,9 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
return flag[0];
}
//显示举报dialog
/**
* 显示举报dialog
*/
@Override
public void showJubao(final Activity activity) {
GetReportReason cmd = new GetReportReason();
......@@ -351,8 +371,9 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
}
LinkedTreeMap<String, String> reportReasonsmaps =
(LinkedTreeMap<String, String>) resp.data;
if (reportReasonsmaps == null)
if (reportReasonsmaps == null) {
return;
}
List<Report> reports = new ArrayList<>();
for (Map.Entry<String, String> entry : reportReasonsmaps.entrySet()) {
Report report = new Report(entry.getKey(), entry.getValue());
......@@ -373,7 +394,9 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
BuryPointUtils.buryPoint(eventName, properties);
}
//发送自定义提醒消息
/**
* 发送自定义提醒消息
*/
@Override
public void sendCustomMsg() {
CustomAttachTipMsg CustomAttachTipMsg = new CustomAttachTipMsg(ImConstants.FIRST_CHAT_TIP);
......@@ -405,7 +428,9 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
@Override
public void saveImTempData(String touid, String content) {
if (touid == null || touid.equals("")) return;
if (touid == null || touid.equals("")) {
return;
}
ImTempData.getInstance().addTempMsg(touid, content);
EventBus.getDefault().post(new UpdateTabUnreadNumEvent());
}
......@@ -415,7 +440,9 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
return ImTempData.getInstance().getTempMsg(touid) == null ? "" : ImTempData.getInstance().getTempMsg(touid);
}
//获取群聊历史记录dialog是否已显示过(0未提示,1已提示过)
/**
* 获取群聊历史记录dialog是否已显示过(0未提示,1已提示过)
*/
@Override
public void chatTeamHistoryTip(Activity activity) {
if (!ImIn.INSTANCE.getChatTeamHisShow()) {
......@@ -424,7 +451,9 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
}
}
//短时间内私聊次数过多,给予警示
/**
* 短时间内私聊次数过多,给予警示
*/
@Override
public void sendMsgToChatTip() {
// CustomAttachChatTipMsg CustomAttachTipMsg = new CustomAttachChatTipMsg(getInfo().forbide_tip);
......@@ -481,11 +510,10 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
.subscribe(resp -> {
if (resp.code == 0) {
ToastUtil.toastShort(activity, "举报成功");
dialog.dismiss();
} else {
ToastUtil.toastShort(activity, resp.msg);
dialog.dismiss();
}
dialog.dismiss();
}, throwable -> {
HttpErrorUtils.Companion.handleError(activity, throwable);
dialog.dismiss();
......@@ -595,8 +623,9 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
if (userType == 1) {
list.add("ta的主页");
}
if (userType == 2)
if (userType == 2) {
list.add("访问专家主页");
}
list.add("历史聊天记录");
list.add("删除聊天记录");
}
......@@ -652,7 +681,9 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
});
}
//删除聊天记录
/**
* 删除聊天记录
*/
private void deleteChatHistory() {
CommonDialog dialog = CommonDialog.create(mActivity);
dialog.setMessage("确定删除与ta的聊天记录?");
......@@ -720,7 +751,11 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
// super.notifyChange();
// EventBus.getDefault().post(new NotifyRecentListChangeEvent(1));
// }
private void skip2ExpertHome() {//跳转到专家主页
/**
* 跳转到专家主页
*/
private void skip2ExpertHome() {
// 跳转到专家主页
String junmpurl = ImIn.INSTANCE.getExpertHost() + docInfo.doctorId;
String share_title = docInfo.name + "咨询工作室";
......@@ -801,7 +836,9 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
}
//倾诉
/**
* 倾诉
*/
@Override
public void confide() {
if (1 == docInfo.listenerIsOpen && !TextUtils.isEmpty(docInfo.doctorId) && !docInfo.doctorId.equals("0")) {
......@@ -828,7 +865,9 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
}
}
//帮助
/**
* 帮助
*/
@Override
public void help() {
......@@ -896,7 +935,9 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
skip2ExpertHome();
}
//跳转用户主页
/**
* 跳转用户主页
*/
@Override
public void showUserHome() {
if (ImIn.INSTANCE.membersIntent(mActivity, docInfo.toUid) != null) {
......
......@@ -22,15 +22,20 @@ public interface IP2PCustomActionHandler {
Boolean isNotPrepare();
boolean deleteMessage(IMMessage message); //需要筛选的消息
/***需要筛选的消息*/
boolean deleteMessage(IMMessage message);
void setDoctorStatus(int status); //更新专家登录状态
/***更新专家登录状态*/
void setDoctorStatus(int status);
void setDoctorBusyNum(int num); //设置专家正在咨询的人数
/***设置专家正在咨询的人数*/
void setDoctorBusyNum(int num);
void judgeSendRemindMsg(String sessionId); //发送提醒上线的用户消息
/***发送提醒上线的用户消息*/
void judgeSendRemindMsg(String sessionId);
void sendRecommendExpertListMessage(String sessionId, ArrayList<RecommendExpertBean> recommendExpertList, int type, boolean showExpertList);//发送推荐专家列表
/***发送推荐专家列表*/
void sendRecommendExpertListMessage(String sessionId, ArrayList<RecommendExpertBean> recommendExpertList, int type, boolean showExpertList);
Activity getmActivity();
......@@ -40,15 +45,19 @@ public interface IP2PCustomActionHandler {
void showDingdan(String url);
void showZhuanjPage();//专家H5主页
/***专家H5主页*/
void showZhuanjPage();
void toExpertHome(String doctorId, String name, String cover); //专家h5主页
/***专家h5主页*/
void toExpertHome(String doctorId, String name, String cover);
void showUserHome();//跳转用户主页
/***跳转用户主页*/
void showUserHome();
void jump();
void h5Video();//跳转h5视频介绍
/***跳转h5视频介绍*/
void h5Video();
//私聊 获取聊天者的订单关系数据(参数cantalk从另一个接口获取)
// void getExpert(int toUid,int cantalk);
......@@ -56,7 +65,8 @@ public interface IP2PCustomActionHandler {
void help();
void makeColections(String toUid); // 发起收款
/***发起收款*/
void makeColections(String toUid);
void clear(String accid);
......@@ -77,40 +87,41 @@ public interface IP2PCustomActionHandler {
void setUserType(int userType);
//获取自己的用户类型
/***获取自己的用户类型*/
int getSelfUserType();
//发红包
/***发红包*/
void sendRedPacket(Activity activity);
//检查用户是否已经绑定手机号
/***检查用户是否已经绑定手机号*/
boolean isBindPhone(Activity activity, String toUid);
//消息中有11位数字,提示是否要隐藏中间5位
/***消息中有11位数字,提示是否要隐藏中间5位*/
boolean HintMessageSend(Activity activity, ReturnCallBack returnCallBack);
//举报
/*** 举报*/
void showJubao(Activity activity);
//埋点统计
/***埋点统计*/
void buryPoint(String eventName, JSONObject properties);
//发送自定义提醒消息
/***发送自定义提醒消息*/
void sendCustomMsg();
//保存聊天未发送的临时内容
/***保存聊天未发送的临时内容*/
void saveImTempData(String touid, String content);
//获取聊天未发送的临时内容
/***获取聊天未发送的临时内容*/
String getImTempData(String touid);
//判断是否需要弹出 获取群聊历史记录dialog
/***判断是否需要弹出 获取群聊历史记录dialog*/
void chatTeamHistoryTip(Activity activity);
//短时间多次私聊 给予警示
/***短时间多次私聊 给予警示*/
void sendMsgToChatTip();
void h5ActivityStart(Context mActivity, String url, boolean isFresh);//跳转h5页面 isFresh表示是否需要下拉刷新功能
/***跳转h5页面 isFresh表示是否需要下拉刷新功能*/
void h5ActivityStart(Context mActivity, String url, boolean isFresh);
void uploadSendMessageError(int code);
......@@ -120,32 +131,33 @@ public interface IP2PCustomActionHandler {
void popCallDialog(Context context);
void setExpertInfo(String toChatUsername, IMExpertBuild expert) ;
void setExpertInfo(String toChatUsername, IMExpertBuild expert);
class DocInfo {
public String toUid;
public String doctorId;
public String listenerId;
public String name = "";
public String title;
public int is_online;//专家状态 1.在线 2.离线 3通话中 4-继续拨打 ,
public int isChatOnline;////专家私聊在线状态 1.在线,2.离线,3.忙碌 4咨询中, 5倾述中 6咨询前准备
public int is_online; //专家状态 1.在线 2.离线 3通话中 4-继续拨打 ,
public int isChatOnline; //专家私聊在线状态 1.在线,2.离线,3.忙碌 4咨询中, 5倾述中 6咨询前准备
public String cover;
public String desc;
public String url_share;
public String price;
public String unitTxt;
public String url;
public int hasAvailableListenOrder;//是否还有未完成的倾诉订单 1、没有 2、有
public int listenOrderCommentStatus;//倾诉订单评论状态 1:未评价 9:已评价 ,
public String listenOrderCommentUrl;//倾诉订单评价页url
public String listenOrderUrl;//订单详情页面url
public String listenOrderDesc;//倾诉订单状态描述
public String listenOrderRemainTime;//未完成倾诉订单剩余时间
public int hasAvailableListenOrder; //是否还有未完成的倾诉订单 1、没有 2、有
public int listenOrderCommentStatus; //倾诉订单评论状态 1:未评价 9:已评价 ,
public String listenOrderCommentUrl; //倾诉订单评价页url
public String listenOrderUrl; //订单详情页面url
public String listenOrderDesc; //倾诉订单状态描述
public String listenOrderRemainTime; //未完成倾诉订单剩余时间
public String urlTitle;
public String blackStatus;
public String orderid;
public int listenerIsOpen;////1 开启 2 关闭
public int is_first = 1;//是否是第一次私聊
public int listenerIsOpen; //1 开启 2 关闭
public int is_first = 1; //是否是第一次私聊
public int busyTotal = 0; //专家当前在与多少人聊天
public String tag1 = ""; //用与获取推荐专家列表接口的参数catName
......@@ -162,7 +174,9 @@ public interface IP2PCustomActionHandler {
public ArrayList<ImCommendDetailBean> commentList;
}
//消息中有11位数字,提示是否要隐藏中间5位 相关
/**
* 消息中有11位数字,提示是否要隐藏中间5位 相关
*/
public interface ReturnCallBack {
boolean RetCallback();
}
......
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