请问如何把日期放到所归lists上面,求思路!!!
Json数据如下:
{"code":1,"message":"团队已使用模板返回成功","result":[{"date":"2016-12-05","lists":[{"category":"浪漫类","create_at":"转发时间","id":"4","mind":"必发提醒1提醒0不提醒","name":"巴黎之夜","thumb":"http://192.168.0.18/Uploads/weiretrans/thumb.png","times":"1转发次数","useis":"1当前用户是否已使用1是0否"},{"category":"浪漫类","create_at":"转发时间","id":"4","mind":"必发提醒1提醒0不提醒","name":"巴黎之夜","thumb":"http://192.168.0.18/Uploads/weiretrans/thumb.png","times":"1转发次数","useis":"1当前用户是否已使用1是0否"},{"category":"浪漫类","create_at":"转发时间","id":"4","mind":"必发提醒1提醒0不提醒","name":"巴黎之夜","thumb":"http://192.168.0.18/Uploads/weiretrans/thumb.png","times":"1转发次数","useis":"1当前用户是否已使用1是0否"}]},{"date":"2016-12-05","lists":[{"category":"浪漫类","create_at":"转发时间","id":"4","mind":"必发提醒1提醒0不提醒","name":"巴黎之夜","thumb":"http://192.168.0.18/Uploads/weiretrans/thumb.png","times":"1转发次数","useis":"1当前用户是否已使用1是0否"},{"category":"浪漫类","create_at":"转发时间","id":"4","mind":"必发提醒1提醒0不提醒","name":"巴黎之夜","thumb":"http://192.168.0.18/Uploads/weiretrans/thumb.png","times":"1转发次数","useis":"1当前用户是否已使用1是0否"},{"category":"浪漫类","create_at":"转发时间","id":"4","mind":"必发提醒1提醒0不提醒","name":"巴黎之夜","thumb":"http://192.168.0.18/Uploads/weiretrans/thumb.png","times":"1转发次数","useis":"1当前用户是否已使用1是0否"}]},{"date":"2016-12-05","lists":[{"category":"浪漫类","create_at":"转发时间","id":"4","mind":"必发提醒1提醒0不提醒","name":"巴黎之夜","thumb":"http://192.168.0.18/Uploads/weiretrans/thumb.png","times":"1转发次数","useis":"1当前用户是否已使用1是0否"},{"category":"浪漫类","create_at":"转发时间","id":"4","mind":"必发提醒1提醒0不提醒","name":"巴黎之夜","thumb":"http://192.168.0.18/Uploads/weiretrans/thumb.png","times":"1转发次数","useis":"1当前用户是否已使用1是0否"},{"category":"浪漫类","create_at":"转发时间","id":"4","mind":"必发提醒1提醒0不提醒","name":"巴黎之夜","thumb":"http://192.168.0.18/Uploads/weiretrans/thumb.png","times":"1转发次数","useis":"1当前用户是否已使用1是0否"}]},{"date":"2016-12-05","lists":[{"category":"浪漫类","create_at":"转发时间","id":"4","mind":"必发提醒1提醒0不提醒","name":"巴黎之夜","thumb":"http://192.168.0.18/Uploads/weiretrans/thumb.png","times":"1转发次数","useis":"1当前用户是否已使用1是0否"},{"category":"浪漫类","create_at":"转发时间","id":"4","mind":"必发提醒1提醒0不提醒","name":"巴黎之夜","thumb":"http://192.168.0.18/Uploads/weiretrans/thumb.png","times":"1转发次数","useis":"1当前用户是否已使用1是0否"},{"category":"浪漫类","create_at":"转发时间","id":"4","mind":"必发提醒1提醒0不提醒","name":"巴黎之夜","thumb":"http://192.168.0.18/Uploads/weiretrans/thumb.png","times":"1转发次数","useis":"1当前用户是否已使用1是0否"}]}]}
那样做反而冗余了吧,list目前和data处于同一级别,可以构造如下的bean类:
使用ListsBean时可以调用父类ResultBean的getDate获取日期。