上麦增加vipMic字段
This commit is contained in:
@@ -85,7 +85,7 @@ public class RoomBaseModel extends BaseModel implements IRoomBaseModel {
|
|||||||
*/
|
*/
|
||||||
protected static final int ROOM_MEMBER_SIZE = 50;
|
protected static final int ROOM_MEMBER_SIZE = 50;
|
||||||
|
|
||||||
public static final int CODE_UPDATE_MIC = 110;
|
public static final int CODE_UPDATE_MIC = 110;
|
||||||
|
|
||||||
protected final Api mRoomService;
|
protected final Api mRoomService;
|
||||||
|
|
||||||
@@ -348,7 +348,7 @@ public class RoomBaseModel extends BaseModel implements IRoomBaseModel {
|
|||||||
final RoomMicInfo roomMicInfo = roomQueueInfo.mRoomMicInfo;
|
final RoomMicInfo roomMicInfo = roomQueueInfo.mRoomMicInfo;
|
||||||
if (chatRoomMember != null) {
|
if (chatRoomMember != null) {
|
||||||
SingleToastUtil.showToast("该麦位已经有人了哦~");
|
SingleToastUtil.showToast("该麦位已经有人了哦~");
|
||||||
callBack.onFail(CODE_UPDATE_MIC,"该麦位已经有人了");
|
callBack.onFail(CODE_UPDATE_MIC, "该麦位已经有人了");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//坑上没人且没锁
|
//坑上没人且没锁
|
||||||
@@ -407,7 +407,7 @@ public class RoomBaseModel extends BaseModel implements IRoomBaseModel {
|
|||||||
if (roomQueueInfo != null && roomQueueInfo.mChatRoomMember == null) {
|
if (roomQueueInfo != null && roomQueueInfo.mChatRoomMember == null) {
|
||||||
JsonObject valueJsonObj = jsonParser.parse(entry.value).getAsJsonObject();
|
JsonObject valueJsonObj = jsonParser.parse(entry.value).getAsJsonObject();
|
||||||
if (valueJsonObj != null) {
|
if (valueJsonObj != null) {
|
||||||
chatRoomMember = gson.fromJson(valueJsonObj,MicMemberInfo.class);
|
chatRoomMember = gson.fromJson(valueJsonObj, MicMemberInfo.class);
|
||||||
roomQueueInfo.mChatRoomMember = chatRoomMember;
|
roomQueueInfo.mChatRoomMember = chatRoomMember;
|
||||||
}
|
}
|
||||||
AvRoomDataManager.get().mMicQueueMemberMap.put(Integer.parseInt(entry.key), roomQueueInfo);
|
AvRoomDataManager.get().mMicQueueMemberMap.put(Integer.parseInt(entry.key), roomQueueInfo);
|
||||||
@@ -609,10 +609,13 @@ public class RoomBaseModel extends BaseModel implements IRoomBaseModel {
|
|||||||
HeadWearInfo headWearInfo = userInfo.getUserHeadwear();
|
HeadWearInfo headWearInfo = userInfo.getUserHeadwear();
|
||||||
if (headWearInfo != null) {
|
if (headWearInfo != null) {
|
||||||
String headWearUrl = headWearInfo.getEffect() != null ? headWearInfo.getEffect() : headWearInfo.getPic();
|
String headWearUrl = headWearInfo.getEffect() != null ? headWearInfo.getEffect() : headWearInfo.getPic();
|
||||||
if (!TextUtils.isEmpty(headWearUrl)){
|
if (!TextUtils.isEmpty(headWearUrl)) {
|
||||||
contentJsonObj.put("headWearUrl", headWearUrl);
|
contentJsonObj.put("headWearUrl", headWearUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (AvRoomDataManager.get().isDatingVip(userInfo.getUid())) {
|
||||||
|
contentJsonObj.put("vipMic", true);
|
||||||
|
}
|
||||||
NIMChatRoomSDK.getChatRoomService()
|
NIMChatRoomSDK.getChatRoomService()
|
||||||
.updateQueueEx(roomId, String.valueOf(micPosition), contentJsonObj.toJSONString(), true)
|
.updateQueueEx(roomId, String.valueOf(micPosition), contentJsonObj.toJSONString(), true)
|
||||||
.setCallback(new RequestCallback<Void>() {
|
.setCallback(new RequestCallback<Void>() {
|
||||||
@@ -1045,8 +1048,8 @@ public class RoomBaseModel extends BaseModel implements IRoomBaseModel {
|
|||||||
@FormUrlEncoded
|
@FormUrlEncoded
|
||||||
@POST("room/mic/upmic")
|
@POST("room/mic/upmic")
|
||||||
Single<ServiceResult<String>> upMicroPhone(@Field("position") int micPosition,
|
Single<ServiceResult<String>> upMicroPhone(@Field("position") int micPosition,
|
||||||
@Field("micUid") String uId,
|
@Field("micUid") String uId,
|
||||||
@Field("roomId") String roomId);
|
@Field("roomId") String roomId);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1060,8 +1063,8 @@ public class RoomBaseModel extends BaseModel implements IRoomBaseModel {
|
|||||||
@FormUrlEncoded
|
@FormUrlEncoded
|
||||||
@POST("room/mic/downmic")
|
@POST("room/mic/downmic")
|
||||||
Single<ServiceResult<String>> downMicroPhone(@Field("position") int micPosition,
|
Single<ServiceResult<String>> downMicroPhone(@Field("position") int micPosition,
|
||||||
@Field("micUid") String uId,
|
@Field("micUid") String uId,
|
||||||
@Field("roomId") String roomId);
|
@Field("roomId") String roomId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下麦接口
|
* 下麦接口
|
||||||
|
Reference in New Issue
Block a user