IP2PCustomActionHandler.java 5.4 KB
Newer Older
konghaorui committed
1 2 3 4 5 6
package com.yidianling.uikit.custom.bridge;

import android.app.Activity;
import android.content.Context;

import com.netease.nimlib.sdk.msg.model.IMMessage;
7
import com.yidianling.im.api.bean.IMExpertBuild;
8
import com.yidianling.im.api.bean.ImCommendDetailBean;
konghaorui committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22
import com.yidianling.uikit.custom.http.response.RecommendExpertBean;

import org.json.JSONObject;

import java.util.ArrayList;

/**
 * Created by haorui on 2019/5/16.
 * Des:
 */
public interface IP2PCustomActionHandler {

    DocInfo getInfo();

23 24
    Boolean isNotPrepare();

25 26
    /***需要筛选的消息*/
    boolean deleteMessage(IMMessage message);
konghaorui committed
27

28 29
    /***更新专家登录状态*/
    void setDoctorStatus(int status);
konghaorui committed
30

31 32
    /***设置专家正在咨询的人数*/
    void setDoctorBusyNum(int num);
konghaorui committed
33

34 35
    /***发送提醒上线的用户消息*/
    void judgeSendRemindMsg(String sessionId);
konghaorui committed
36

37 38
    /***发送推荐专家列表*/
    void sendRecommendExpertListMessage(String sessionId, ArrayList<RecommendExpertBean> recommendExpertList, int type, boolean showExpertList);
konghaorui committed
39 40 41 42 43 44 45 46 47

    Activity getmActivity();

    void setmActivity(Activity mActivity);

    void clickMoreIcon();

    void showDingdan(String url);

48 49
    /***专家H5主页*/
    void showZhuanjPage();
konghaorui committed
50

51 52
    /***专家h5主页*/
    void toExpertHome(String doctorId, String name, String cover);
konghaorui committed
53

54 55
    /***跳转用户主页*/
    void showUserHome();
konghaorui committed
56 57 58

    void jump();

59 60
    /***跳转h5视频介绍*/
    void h5Video();
konghaorui committed
61 62 63 64 65 66 67

    //私聊 获取聊天者的订单关系数据(参数cantalk从另一个接口获取)
    //        void getExpert(int toUid,int cantalk);
    void confide();

    void help();

68 69
    /***发起收款*/
    void makeColections(String toUid);
konghaorui committed
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89

    void clear(String accid);

    void put(Activity a);

    void showHelp(String url);

    void resumeUm(Activity activity);

    void pauseUm(Activity activity);

    int getUserType();

    /**
     * 判断是否需要发送自定义消息
     */
    void isNeedSendMsg(boolean isCheckFrom);

    void setUserType(int userType);

90
    /***获取自己的用户类型*/
konghaorui committed
91 92
    int getSelfUserType();

93
    /***发红包*/
konghaorui committed
94 95
    void sendRedPacket(Activity activity);

96
    /***检查用户是否已经绑定手机号*/
konghaorui committed
97 98
    boolean isBindPhone(Activity activity, String toUid);

99
    /***消息中有11位数字,提示是否要隐藏中间5位*/
konghaorui committed
100 101
    boolean HintMessageSend(Activity activity, ReturnCallBack returnCallBack);

102
    /*** 举报*/
konghaorui committed
103 104
    void showJubao(Activity activity);

105
    /***埋点统计*/
konghaorui committed
106 107
    void buryPoint(String eventName, JSONObject properties);

108
    /***发送自定义提醒消息*/
konghaorui committed
109 110
    void sendCustomMsg();

111
    /***保存聊天未发送的临时内容*/
konghaorui committed
112 113
    void saveImTempData(String touid, String content);

114
    /***获取聊天未发送的临时内容*/
konghaorui committed
115 116
    String getImTempData(String touid);

117
    /***判断是否需要弹出 获取群聊历史记录dialog*/
konghaorui committed
118 119
    void chatTeamHistoryTip(Activity activity);

120
    /***短时间多次私聊  给予警示*/
konghaorui committed
121 122
    void sendMsgToChatTip();

123 124
    /***跳转h5页面 isFresh表示是否需要下拉刷新功能*/
    void h5ActivityStart(Context mActivity, String url, boolean isFresh);
konghaorui committed
125 126 127 128 129 130 131 132 133

    void uploadSendMessageError(int code);

    void startHelp(Context context);

    void startFeedback(Context context);

    void popCallDialog(Context context);

134 135
    void setExpertInfo(String toChatUsername, IMExpertBuild expert);

konghaorui committed
136 137 138 139 140 141
    class DocInfo {
        public String toUid;
        public String doctorId;
        public String listenerId;
        public String name = "";
        public String title;
142 143
        public int is_online; //专家状态 1.在线 2.离线 3通话中 4-继续拨打 ,
        public int isChatOnline; //专家私聊在线状态 1.在线,2.离线,3.忙碌 4咨询中, 5倾述中  6咨询前准备
konghaorui committed
144 145 146 147 148 149
        public String cover;
        public String desc;
        public String url_share;
        public String price;
        public String unitTxt;
        public String url;
150 151 152 153 154 155
        public int hasAvailableListenOrder; //是否还有未完成的倾诉订单 1、没有 2、有
        public int listenOrderCommentStatus; //倾诉订单评论状态 1:未评价 9:已评价 ,
        public String listenOrderCommentUrl; //倾诉订单评价页url
        public String listenOrderUrl; //订单详情页面url
        public String listenOrderDesc; //倾诉订单状态描述
        public String listenOrderRemainTime; //未完成倾诉订单剩余时间
konghaorui committed
156 157 158
        public String urlTitle;
        public String blackStatus;
        public String orderid;
159 160
        public int listenerIsOpen; //1 开启 2 关闭
        public int is_first = 1; //是否是第一次私聊
konghaorui committed
161 162 163
        public int busyTotal = 0; //专家当前在与多少人聊天
        public String tag1 = ""; //用与获取推荐专家列表接口的参数catName

164
        public double doctorBriefInfoFeedbackRate = 0.000;  //好评分
徐健 committed
165
        public String doctorBriefInfoFeedbackRateForShow = "";
konghaorui committed
166 167 168
        public int doctorBriefInfoOrderNum = 0; //帮助人数
        public int doctorBriefInfoHelpLong = 0; //服务时长
        public String doctorBriefInfoSmallImage = ""; //小头像
169

170 171
        public Boolean isFollowed = false; // 是否关注

172 173 174
        public int commentCounter = 0;
        public String commentCounterUrl = "";
        public ArrayList<ImCommendDetailBean> commentList;
konghaorui committed
175 176
    }

177 178 179
    /**
     * 消息中有11位数字,提示是否要隐藏中间5位  相关
     */
konghaorui committed
180 181 182 183 184
    public interface ReturnCallBack {
        boolean RetCallback();
    }

}