类型转换漏写
parent
983234701d
commit
e931d53f5c
|
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
|||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.globals.Global;
|
||||
import com.ljsd.jieling.globals.GlobalItemType;
|
||||
import com.ljsd.jieling.logic.dao.Equip;
|
||||
import com.ljsd.jieling.logic.dao.Jewel;
|
||||
import com.ljsd.jieling.logic.dao.PropertyItem;
|
||||
import com.mongodb.BasicDBObject;
|
||||
|
@ -22,6 +23,8 @@ public class MongoPropertyConverter implements Converter<BasicDBObject, Property
|
|||
Class<? extends PropertyItem> target = PropertyItem.class;
|
||||
if(equipId.getItemType() == GlobalItemType.JEWEL){
|
||||
target = Jewel.class;
|
||||
}else {
|
||||
target = Equip.class;
|
||||
}
|
||||
String realJson = source.toJson(jsonWriterSettings);
|
||||
PropertyItem propertyItem = JSON.parseObject(realJson,target);
|
||||
|
|
Loading…
Reference in New Issue