问题:
将一个list对象转成另一个list对象;
fastjson包:
<dependency><groupId>com.alibaba</groupId><artifactId>fastjson</artifactId><version>1.2.58</version></dependency>
解决:
List<PassengerInfo> passengerInfos = passengerMapper.selectList(passengerQueryWrapper);//List<PassengerInfo>转jsonString str = JSON.toJSONString(passengerInfos);//json转List<PassengerDetailsVO>List<PassengerDetailsVO> passengerDetailsVOS = JSON.parseObject(str, new TypeReference<List<PassengerDetailsVO>>() {});