新增牌照房小时榜

This commit is contained in:
huangjian
2022-06-07 16:26:48 +08:00
parent 8b001a4028
commit 4f104f9685
13 changed files with 198 additions and 18 deletions

View File

@@ -457,6 +457,14 @@ public class UriProvider {
return JAVA_WEB_URL.concat("/yinyou/modules/room_rank/hourRank.html?roomUid=" + roomUid);
}
/**
* 牌照房小时榜
*/
public static String getRoomHourRankUrl(long roomUid) {
return JAVA_WEB_URL.concat("/yinyou/modules/room_rank/index_license.html?roomUid=" + roomUid);
}
/**
* 周星榜
*/

View File

@@ -1315,6 +1315,11 @@ public final class IMNetEaseManager {
noticeRoomEvent(msg, RoomEvent.SINGLE_ROOM_RANK_TOP_NOTIFY);
}
break;
case CUSTOM_MSG_ROOM_RANK:
if (second == CUSTOM_MSG_SUB_ROOM_RANK_TOP) {
noticeRoomEvent(msg, RoomEvent.ROOM_RANK_TOP_NOTIFY);
}
break;
default:
break;
}

View File

@@ -580,6 +580,9 @@ public class CustomAttachParser implements MsgAttachmentParser {
case CustomAttachment.CUSTOM_MSG_SINGLE_ROOM_RANK:
attachment = new SingleRoomRankAttachment(second);
break;
case CustomAttachment.CUSTOM_MSG_ROOM_RANK:
attachment = new RoomRankAttachment(second);
break;
default:
LogUtils.e("未定义的first,请现在CustomAttachParser中解析first=" + first + " second=" + second);
break;

View File

@@ -370,13 +370,18 @@ public class CustomAttachment implements MsgAttachment {
public static final int SKILL_MSG_AUDIO = 87;
public static final int CP_INVITE_MESSAGE = 88;
public static final int CP_INVITE_MESSAGE_TOP_NOTICE = 881;
public static final int CUSTOM_MSG_SINGLE_ROOM_RANK = 89;
public static final int CUSTOM_MSG_SUB_SINGLE_ROOM_RANK_TOP = 891;
public static final int CUSTOM_MSG_FANS_TEAM = 90;
public static final int CUSTOM_MSG_SUB_FANS_TEAM_OPEN = 901; //开通粉丝团
public static final int CUSTOM_MSG_SUB_FANS_TEAM_OPEN_FAILED = 902; // 开通粉丝团失败
public static final int CUSTOM_MSG_SUB_FANS_TEAM_JOIN = 903; // 加入粉丝团
public static final int CUSTOM_MSG_SUB_FANS_TEAM_EXIT = 904; // 退出粉丝团
public static final int CUSTOM_MSG_ROOM_RANK = 91;
public static final int CUSTOM_MSG_SUB_ROOM_RANK_TOP = 911;
/**
* 自定义消息附件的类型,根据该字段区分不同的自定义消息
*/

View File

@@ -0,0 +1,31 @@
package com.yizhuan.xchat_android_core.im.custom.bean;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
public class RoomRankAttachment extends CustomAttachment {
private RoomRankMsgBean msgBean;
public RoomRankAttachment(int second) {
super(CUSTOM_MSG_ROOM_RANK, second);
}
public RoomRankMsgBean getMsgBean() {
return msgBean;
}
public void setMsgBean(RoomRankMsgBean msgBean) {
this.msgBean = msgBean;
}
@Override
protected void parseData(JSONObject data) {
msgBean = new Gson().fromJson(data.toJSONString(), RoomRankMsgBean.class);
}
@Override
protected JSONObject packData() {
return null;
}
}

View File

@@ -0,0 +1,11 @@
package com.yizhuan.xchat_android_core.im.custom.bean;
import lombok.Data;
@Data
public class RoomRankMsgBean {
private long uid;
private String title;
private String avatar;
private String desc;
}

View File

@@ -231,6 +231,8 @@ public class RoomEvent {
public static final int ROOM_CLEAN_SCREEN = 90;
public static final int ROOM_RANK_TOP_NOTIFY = 91;
private int event = NONE;
private int micPosition = Integer.MIN_VALUE;
private int posState = -1;