

package com.mortals.xhx.protocol.complex;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.mortals.xhx.protocol.complex.matter.model.rsp.LoginRspInfo;
import com.mortals.xhx.protocol.complex.matter.model.rsp.matter.MatterWorkInfo;
import lombok.Data;

import java.util.List;

@Data
public class ComplexApiRest<T> {
    private T result;
    private Integer code;
    private String message;
    private Boolean success;

    private Long timestamp;


    public static void main(String[] args) {
        String str="{\"success\":true,\"message\":\"操作成功！\",\"code\":200,\"result\":[{\"name\":\"巡游出租汽车驾驶员从业资格证件换证\",\"id\":\"43c54baf1b2289f2038a394e9764ff4f\",\"type\":\"02\",\"label\":\"巡游出租汽车驾驶员从业资格证件换证\",\"key\":\"1737020401801781251\",\"children\":[{\"situationItemId\":\"3de45cfbadd07f9310df2f7ca107ac13\",\"parentId\":\"-1\",\"label\":\"委托他人办理\",\"situationDefineId\":\"43c54baf1b2289f2038a394e9764ff4f\",\"situationItemName\":\"委托他人办理\",\"situationItemType\":\"01\",\"type\":\"01\",\"id\":\"3de45cfbadd07f9310df2f7ca107ac13\",\"key\":\"1737020401801781249\",\"materials\":[{\"name\":\"出租汽车驾驶员从业资格证补（换）发申请表\",\"id\":\"68e3c3c7d68066d1bd9d1834f1697558\",\"parentId\":\"3de45cfbadd07f9310df2f7ca107ac13\",\"type\":\"03\",\"label\":\"出租汽车驾驶员从业资格证补（换）发申请表\",\"pid\":\"3de45cfbadd07f9310df2f7ca107ac13\",\"key\":\"30fe3fa0f1fd41559a172804979fd9a2\",\"paperCopies\":1,\"fromId\":\"3\"},{\"name\":\"委托人及受托人身份证\",\"id\":\"83051b276facf312d7e4560bace42f2d\",\"parentId\":\"3de45cfbadd07f9310df2f7ca107ac13\",\"type\":\"03\",\"label\":\"委托人及受托人身份证\",\"pid\":\"3de45cfbadd07f9310df2f7ca107ac13\",\"key\":\"55d3b4e89b5f4988a8f2ec5df7b837f6\",\"paperCopies\":1,\"fromId\":\"3\"},{\"name\":\"个人授权委托书\",\"id\":\"5ab535035c8aec981c0d0a91525ce6d0\",\"parentId\":\"3de45cfbadd07f9310df2f7ca107ac13\",\"type\":\"03\",\"label\":\"个人授权委托书\",\"pid\":\"3de45cfbadd07f9310df2f7ca107ac13\",\"key\":\"6a22eb9a7f0348509c779268b48cb4d8\",\"paperCopies\":1,\"fromId\":\"3\"}]},{\"situationItemId\":\"a1ad71dea0518daae040fae526f446ed\",\"parentId\":\"-1\",\"label\":\"本人办理\",\"situationDefineId\":\"43c54baf1b2289f2038a394e9764ff4f\",\"situationItemName\":\"本人办理\",\"situationItemType\":\"01\",\"type\":\"01\",\"id\":\"a1ad71dea0518daae040fae526f446ed\",\"key\":\"1737020401801781250\",\"materials\":[{\"name\":\"出租汽车驾驶员从业资格证补（换）发申请表\",\"id\":\"68e3c3c7d68066d1bd9d1834f1697558\",\"parentId\":\"a1ad71dea0518daae040fae526f446ed\",\"type\":\"03\",\"label\":\"出租汽车驾驶员从业资格证补（换）发申请表\",\"pid\":\"a1ad71dea0518daae040fae526f446ed\",\"key\":\"1d79509c90ac418baefe057a5d744fcf\",\"paperCopies\":1,\"fromId\":\"3\"}]}]}],\"timestamp\":1702972910726}";

        ComplexApiRest<List<MatterWorkInfo>> loginRspInfoComplexApiRest = JSON.parseObject(str, new TypeReference<ComplexApiRest<List<MatterWorkInfo>>>() {
        });

        System.out.println(JSON.toJSONString(loginRspInfoComplexApiRest));

    }
}
