feat:完成房间榜流水展示
This commit is contained in:
@@ -727,6 +727,13 @@ public class CustomAttachParser implements MsgAttachmentParser {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case CustomAttachment.CUSTOM_MSG_ROOM_SERIAL_VALUE_CHANGED:
|
||||
switch (second) {
|
||||
case CustomAttachment.CUSTOM_MSG_ROOM_SERIAL_VALUE_CHANGED_SUB:
|
||||
attachment = new RoomSerialValueChangedAttachment(first, second);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LogUtils.e(ResUtil.getString(R.string.custom_bean_customattachparser_01) + first + " second=" + second);
|
||||
break;
|
||||
|
@@ -527,6 +527,13 @@ public class CustomAttachment implements MsgAttachment {
|
||||
public static final int CUSTOM_MSG_FAMILY_CREATE = 1107;
|
||||
public static final int CUSTOM_MSG_FAMILY_DISMISS = 1108;
|
||||
|
||||
|
||||
/**
|
||||
* 房间总流水
|
||||
*/
|
||||
public static final int CUSTOM_MSG_ROOM_SERIAL_VALUE_CHANGED = 111;
|
||||
public static final int CUSTOM_MSG_ROOM_SERIAL_VALUE_CHANGED_SUB = 1110;
|
||||
|
||||
/**
|
||||
* 自定义消息附件的类型,根据该字段区分不同的自定义消息
|
||||
*/
|
||||
|
@@ -0,0 +1,22 @@
|
||||
package com.chwl.core.im.custom.bean
|
||||
|
||||
import androidx.annotation.Keep
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.chwl.core.bean.game.GameRoomInfo
|
||||
import com.chwl.library.utils.json.JsonUtils
|
||||
import com.google.gson.Gson
|
||||
|
||||
@Keep
|
||||
class RoomSerialValueChangedAttachment : CustomAttachment {
|
||||
|
||||
var serialValue: Double? = null
|
||||
|
||||
constructor() : super()
|
||||
constructor(first: Int, second: Int) : super(first, second)
|
||||
|
||||
override fun parseData(data: JSONObject?) {
|
||||
if (data?.contains("serialValue") == true) {
|
||||
serialValue = data.getDoubleValue("serialValue")
|
||||
}
|
||||
}
|
||||
}
|
@@ -231,6 +231,9 @@ public final class AvRoomDataManager {
|
||||
@Getter
|
||||
private boolean hasRoomAlbum;
|
||||
|
||||
@Getter
|
||||
private double serialValue;
|
||||
|
||||
private List<Integer> unlockedRoomAlbumPhotos = new ArrayList<>();
|
||||
|
||||
private AvRoomDataManager() {
|
||||
@@ -295,6 +298,7 @@ public final class AvRoomDataManager {
|
||||
pkBeginTime = roomInfo.getPkBeginTime();
|
||||
redEnvelopeType = roomInfo.getRedEnvelopeType();
|
||||
hasRoomAlbum = roomInfo.isHasRoomAlbum();
|
||||
serialValue = roomInfo.getSerialValue();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -1488,6 +1488,11 @@ public final class IMNetEaseManager {
|
||||
noticeRoomEvent(msg, RoomEvent.TEMPLATE_NOTIFY);
|
||||
}
|
||||
break;
|
||||
case CUSTOM_MSG_ROOM_SERIAL_VALUE_CHANGED:
|
||||
if (second == CUSTOM_MSG_ROOM_SERIAL_VALUE_CHANGED_SUB) {
|
||||
noticeRoomEvent(msg, RoomEvent.SERIAL_VALUE_CHANGED);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@@ -268,6 +268,9 @@ public class RoomEvent {
|
||||
//PK创建
|
||||
public static final int PK_CREATE = 111;
|
||||
|
||||
//房间流水
|
||||
public static final int SERIAL_VALUE_CHANGED = 112;
|
||||
|
||||
private int event = NONE;
|
||||
private int micPosition = Integer.MIN_VALUE;
|
||||
private int posState = -1;
|
||||
|
@@ -154,6 +154,8 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
private boolean showPkBeginTime;
|
||||
private long pkBeginTime;
|
||||
|
||||
// 总流水
|
||||
private double serialValue;
|
||||
|
||||
protected RoomInfo(Parcel in) {
|
||||
uid = in.readLong();
|
||||
@@ -216,6 +218,7 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
mgName = in.readString();
|
||||
mgMicNum = in.readInt();
|
||||
clearScreenTime = in.readLong();
|
||||
serialValue = in.readDouble();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -280,6 +283,7 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
dest.writeString(mgName);
|
||||
dest.writeInt(mgMicNum);
|
||||
dest.writeLong(clearScreenTime);
|
||||
dest.writeDouble(serialValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user