List<CyEatTimeVo> cyEatTimeVoList = new ArrayList<CyEatTimeVo>();
if(!CheckUtil.checkNull(startTime1)&&!CheckUtil.checkNull(endTime1)){
CyEatTimeVo cyEatTimeVo1 = new CyEatTimeVo();
cyEatTimeVo1.setStartTime(startTime1);
cyEatTimeVo1.setEndTime(endTime1);
cyEatTimeVoList.add(cyEatTimeVo1);
}
if(!CheckUtil.checkNull(startTime2)&&!CheckUtil.checkNull(endTime2)){
CyEatTimeVo cyEatTimeVo2 = new CyEatTimeVo();
cyEatTimeVo2.setStartTime(startTime2);
cyEatTimeVo2.setEndTime(endTime2);
cyEatTimeVoList.add(cyEatTimeVo2);
}
String eatTime = JsonUtil.objectToJson(cyEatTimeVoList);
list对象转json字符串
猜你喜欢
转载自blog.csdn.net/qq_31122833/article/details/80003157
今日推荐
周排行