1 关系系统 UI调整 2 修改数消息解析
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
package com.yizhuan.xchat_android_core.im.custom.bean;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
public class CpInviteAttachment extends CustomAttachment {
|
||||
|
||||
public String msg;
|
||||
public int routerType;
|
||||
public String routerValue;
|
||||
public String title;
|
||||
public int mSecond;
|
||||
|
||||
public CpInviteAttachment(int second) {
|
||||
super(CustomAttachment.CP_INVITE_MESSAGE, second);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void parseData(JSONObject data) {
|
||||
super.parseData(data);
|
||||
super.parseData(data);
|
||||
if (data != null) {
|
||||
if (data.containsKey("msg")) {
|
||||
msg = data.getString("msg");
|
||||
}
|
||||
if (data.containsKey("routerType")) {
|
||||
routerType = data.getInteger("routerType");
|
||||
}
|
||||
if (data.containsKey("propInfo")) {
|
||||
routerValue = data.getString("propInfo");
|
||||
}
|
||||
if (data.containsKey("title")) {
|
||||
title = data.getString("title");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected JSONObject packData() {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("routerType", routerType);
|
||||
jsonObject.put("msg", msg);
|
||||
jsonObject.put("propInfo", routerValue);
|
||||
jsonObject.put("title", title);
|
||||
return jsonObject;
|
||||
}
|
||||
}
|
@@ -556,6 +556,10 @@ public class CustomAttachParser implements MsgAttachmentParser {
|
||||
case CustomAttachment.ANCHOR_ROOM_AUDIENCE_UPMIC:
|
||||
attachment = new RequestUpmicAttachment(CustomAttachment.ANCHOR_ROOM_AUDIENCE_UPMIC, 0);
|
||||
break;
|
||||
|
||||
case CustomAttachment.CP_INVITE_MESSAGE:
|
||||
attachment = new CpInviteAttachment(CustomAttachment.CP_INVITE_MESSAGE_TOP_NOTICE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@@ -12,7 +12,9 @@ import com.yizhuan.xchat_android_core.noble.NobleInfo;
|
||||
* @date 2017/6/8
|
||||
*/
|
||||
public class CustomAttachment implements MsgAttachment {
|
||||
/** 自定义消息附件的类型,根据该字段区分不同的自定义消息 */
|
||||
/**
|
||||
* 自定义消息附件的类型,根据该字段区分不同的自定义消息
|
||||
*/
|
||||
protected int first;
|
||||
protected int second;
|
||||
protected JSONObject data;
|
||||
@@ -64,9 +66,13 @@ public class CustomAttachment implements MsgAttachment {
|
||||
|
||||
// 贵族
|
||||
public static final int CUSTOM_MESS_HEAD_NOBLE = 14;
|
||||
/** 靓号未生效提醒 */
|
||||
/**
|
||||
* 靓号未生效提醒
|
||||
*/
|
||||
public static final int CUSTOM_MSG_HEADER_TYPE_GOOD_NUMBER_INACTIVE = 147;
|
||||
/** 贵族快到期(前三天)消息 */
|
||||
/**
|
||||
* 贵族快到期(前三天)消息
|
||||
*/
|
||||
public static final int CUSTOM_MSG_HEADER_TYPE_NOBLE_END = 144;
|
||||
|
||||
// 开通贵族
|
||||
@@ -82,7 +88,9 @@ public class CustomAttachment implements MsgAttachment {
|
||||
// 推荐房间
|
||||
public static final int CUSTOM_MESS_SUB_RECOM_ROOM = 149;
|
||||
|
||||
/** 进场横幅 (客户端定义) */
|
||||
/**
|
||||
* 进场横幅 (客户端定义)
|
||||
*/
|
||||
public static final int CUSTOM_MESS_SUB_ROOM_WELCOME = 141;
|
||||
|
||||
// 座驾
|
||||
@@ -113,14 +121,14 @@ public class CustomAttachment implements MsgAttachment {
|
||||
public static final int CUSTOM_MSG_ASSISTANT_MSG = 19;
|
||||
// 小秘书通用消息
|
||||
public static final int CUSTOM_MSG_ASSISTANT_COMMON_MSG = 191;
|
||||
|
||||
|
||||
// 房间信息更新
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO=20;
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO_GIFT=201;
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO_AUDIO=202;
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO_CLOSE_SCREEN=203;
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO = 20;
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO_GIFT = 201;
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO_AUDIO = 202;
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO_CLOSE_SCREEN = 203;
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO_NOTICE = 204; // 通用公屏提示文案,使用于各种模式的开和关
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO_CLOSE_REDPACKAGE=205;
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO_CLOSE_REDPACKAGE = 205;
|
||||
|
||||
// 群红包
|
||||
public static final int CUSTOM_MSG_HEADER_TYPE_LUCKY_MONEY = 21;
|
||||
@@ -140,16 +148,16 @@ public class CustomAttachment implements MsgAttachment {
|
||||
public static final int CUSTOM_MSG_SUB_TYPE_COMMON_SYSTEM_MSG_APPROVAL = 232;
|
||||
|
||||
//等级提升弹窗
|
||||
public static final int CUSTOM_MSG_LEVEL_UP=24;
|
||||
public static final int CUSTOM_MSG_EXPER_LEVEL_UP=241;
|
||||
public static final int CUSTOM_MSG_CHARM_LEVEL_UP=242;
|
||||
public static final int CUSTOM_MSG_EXPER_LEVEL_UP_NOTICE=243;
|
||||
public static final int CUSTOM_MSG_LEVEL_UP = 24;
|
||||
public static final int CUSTOM_MSG_EXPER_LEVEL_UP = 241;
|
||||
public static final int CUSTOM_MSG_CHARM_LEVEL_UP = 242;
|
||||
public static final int CUSTOM_MSG_EXPER_LEVEL_UP_NOTICE = 243;
|
||||
//龙珠游戏
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR=25;
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR_START=251;
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR_END=252;
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR_CANCEL=253;
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR_RUNAWAY=254;
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR = 25;
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR_START = 251;
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR_END = 252;
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR_CANCEL = 253;
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR_RUNAWAY = 254;
|
||||
//房间开宝箱
|
||||
public static final int CUSTOM_MSG_BOX = 26;
|
||||
public static final int CUSTOM_MSG_SUB_BOX_ME = 261;//自己可见
|
||||
@@ -186,7 +194,7 @@ public class CustomAttachment implements MsgAttachment {
|
||||
public static final int CUSTOM_MSG_QUEUING_MIC = 30;
|
||||
public static final int CUSTOM_MSG_SUB_QUEUING_MIC_NON_EMPTY = 301; // 从无人排麦到有人排麦
|
||||
public static final int CUSTOM_MSG_SUB_QUEUING_MIC_EMPTY = 302; // 从有人排麦到无人排麦
|
||||
public static final int CUSTOM_MSG_SUB_QUEUING_MIC_MODE_OPEN = 303; // 开启排麦模式
|
||||
public static final int CUSTOM_MSG_SUB_QUEUING_MIC_MODE_OPEN = 303; // 开启排麦模式
|
||||
public static final int CUSTOM_MSG_SUB_QUEUING_MIC_MODE_CLOSE = 304; // 关闭排麦模式
|
||||
public static final int CUSTOM_MSG_SUB_QUEUING_MIC_FREE_MIC_OPEN = 305; // 将坑位设置成自由麦
|
||||
public static final int CUSTOM_MSG_SUB_QUEUING_MIC_FREE_MIC_CLOSE = 306; // 将坑位设置成排麦
|
||||
@@ -426,6 +434,10 @@ public class CustomAttachment implements MsgAttachment {
|
||||
///个播房观众点击空坑位,房主收到请求上麦提示
|
||||
public static final int ANCHOR_ROOM_AUDIENCE_UPMIC = 86;
|
||||
|
||||
|
||||
public static final int CP_INVITE_MESSAGE = 88;
|
||||
public static final int CP_INVITE_MESSAGE_TOP_NOTICE = 881;
|
||||
|
||||
public CustomAttachment() {
|
||||
|
||||
}
|
||||
|
@@ -201,13 +201,13 @@ public class RouterType {
|
||||
/**
|
||||
* Cp邀请
|
||||
*/
|
||||
public static final int CP_INVITE = 62;
|
||||
public static final int CP_INVITE = 61;
|
||||
|
||||
/**
|
||||
* Cp关系任务
|
||||
*/
|
||||
|
||||
public static final int CP_TASK = 61;
|
||||
public static final int CP_TASK = 62;
|
||||
|
||||
/**
|
||||
* CP头饰
|
||||
|
@@ -0,0 +1,18 @@
|
||||
package com.yizhuan.xchat_android_core.relation.cp
|
||||
|
||||
data class CpInviteMessageEntity(
|
||||
val replyExpireTime: String,
|
||||
val inviteUid: Long,
|
||||
val inviteAvatar: String,
|
||||
val inviteNick: String,
|
||||
val inviteGender: Int,
|
||||
val acceptUid: Long,
|
||||
val acceptAvatar: String,
|
||||
val acceptNick: String,
|
||||
val acceptGender: Int,
|
||||
val propsId: Int,
|
||||
val propsName: String,
|
||||
val propsImg: String,
|
||||
val propsPrice: Double,
|
||||
val recommenTxt: List<String>,
|
||||
)
|
@@ -7,7 +7,7 @@ data class CpRelation(
|
||||
val cpId: Long,// cp记录id
|
||||
//邀请人
|
||||
val uid: Long,//邀请人uid
|
||||
val nick: Long,//邀请人
|
||||
val nick: String,//邀请人
|
||||
val gender: Int,//1-男2-女 //邀请人
|
||||
val avatar: String,//邀请人
|
||||
//被邀请人
|
||||
@@ -22,5 +22,5 @@ data class CpRelation(
|
||||
val cpKeepDuration: String,
|
||||
val cpBackImg: String,
|
||||
val waitUnbound: Boolean,//CP状态 true 解绑中
|
||||
val unBoundUid: Long//解绑发起人UID
|
||||
val unboundUid: Long//解绑发起人UID
|
||||
)
|
Reference in New Issue
Block a user