塔罗牌公屏消息

This commit is contained in:
huangjian
2021-01-21 15:32:40 +08:00
parent efde73af0d
commit 3d80ccd003
11 changed files with 114 additions and 32 deletions

View File

@@ -292,7 +292,7 @@ public class XChatConstants {
/**
* Referer (DEBUG)
*/
public static final String KEY_REFERER_DEBUG = "http://120.79.211.243/";
public static final String KEY_REFERER_DEBUG = "http://api.uat.zhongjialx.com/";
/**
* Referer (RELEASE)

View File

@@ -726,7 +726,8 @@ public final class IMNetEaseManager {
|| customAttachment.getFirst() == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_FOLLOW_ROOM
|| customAttachment.getFirst() == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_SEND_MAGIC
|| customAttachment.getFirst() == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_MULTI_GIFT
|| customAttachment.getFirst() == CUSTOM_MSG_HEADER_TYPE_KICK_MIC
|| customAttachment.getFirst() == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_KICK_MIC
|| customAttachment.getFirst() == CustomAttachment.CUSTOM_MESS_TAROT
|| customAttachment.getFirst() == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_MONSTER_HUNTING
|| customAttachment.getFirst() == CustomAttachment.CUSTOM_MSG_MINI_WORLD) {
addMessages(msg);

View File

@@ -534,6 +534,10 @@ public class CustomAttachParser implements MsgAttachmentParser {
}
break;
case CustomAttachment.CUSTOM_MESS_TAROT:
attachment = new TarotAttachment(CustomAttachment.CUSTOM_MESS_TAROT, CustomAttachment.CUSTOM_MESS_TAROT_SUCCESS);
break;
default:
break;
}

View File

@@ -366,8 +366,9 @@ public class CustomAttachment implements MsgAttachment {
//推送消息
public static final int CUSTOM_MSG_PUSH_NOTIFIFICATION = 70;
public static final int CUSTOM_MSG_SUB_PUSH_NOTIFICATION_IN_ROOM = 701;// 推送进入房间
// public static final int CUSTOM_MSG_SUB_PUSH_NOTIFICATION_IN_CHAT_ROOM = 702;// 推送进入聊天页
// public static final int CUSTOM_MSG_SUB_PUSH_NOTIFICATION_IN_DYNAMIC_MSG = 703;// 推送进入动态消息
public static final int CUSTOM_MESS_TAROT = 71; //塔罗牌充值消息
public static final int CUSTOM_MESS_TAROT_SUCCESS = 711; //塔罗牌充值中奖消息
public CustomAttachment() {

View File

@@ -0,0 +1,37 @@
package com.yizhuan.xchat_android_core.im.custom.bean;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
public class TarotAttachment extends CustomAttachment {
private TarotMsgBean tarotMsgBean;
public TarotAttachment(int first, int second) {
super(first, second);
}
public TarotMsgBean getTarotMsgBean() {
return tarotMsgBean;
}
public void setTarotMsgBean(TarotMsgBean tarotMsgBean) {
this.tarotMsgBean = tarotMsgBean;
}
@Override
protected void parseData(JSONObject data) {
tarotMsgBean = new Gson().fromJson(data.toJSONString(), TarotMsgBean.class);
}
@Override
protected JSONObject packData() {
JSONObject jsonObject = new JSONObject();
jsonObject.put("chargeProdId", tarotMsgBean.getChargeProdId());
jsonObject.put("chargeProdName", tarotMsgBean.getChargeProdName());
jsonObject.put("drawGoldNum", tarotMsgBean.getDrawGoldNum());
jsonObject.put("nick", tarotMsgBean.getNick());
jsonObject.put("roomUid", tarotMsgBean.getRoomUid());
jsonObject.put("uid", tarotMsgBean.getUid());
return jsonObject;
}
}

View File

@@ -0,0 +1,31 @@
package com.yizhuan.xchat_android_core.im.custom.bean;
import lombok.Data;
@Data
public class TarotMsgBean {
/**
* 中奖用户uid
**/
private long uid;
/**
* 中奖用户昵称
**/
private String nick;
/**
* 中奖的房间uid
**/
private long roomUid;
/**
* 中奖的产品ID
**/
private String chargeProdId;
/**
* 中奖的产品名称
**/
private String chargeProdName;
/**
* 中奖的金币数量
**/
private long drawGoldNum;
}