房间心愿单:消息解析异常问题处理
This commit is contained in:
@@ -2,6 +2,7 @@ package com.mango.core.im.custom.bean;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alibaba.fastjson.TypeReference;
|
import com.alibaba.fastjson.TypeReference;
|
||||||
|
import com.google.gson.Gson;
|
||||||
import com.mango.core.room.wishlist.WishItemInfo;
|
import com.mango.core.room.wishlist.WishItemInfo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -39,8 +40,10 @@ public class WishListAttachment extends CustomAttachment {
|
|||||||
@Override
|
@Override
|
||||||
protected void parseData(JSONObject data) {
|
protected void parseData(JSONObject data) {
|
||||||
roomUid = data.getLongValue("roomUid");
|
roomUid = data.getLongValue("roomUid");
|
||||||
gifts = data.getObject("gifts", new TypeReference<List<List<Integer>>>() {
|
gifts = new Gson().fromJson(
|
||||||
}.getType());
|
data.getJSONArray("gifts").toJSONString(),
|
||||||
|
new TypeReference<List<WishItemInfo>>() {
|
||||||
|
}.getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user