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