zhitong.yu
7 天以前 7fc9c42987a13c1d8d2159591a5803e70518827f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.hxzk.gps.controller.User.Results;
 
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;
 
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
 
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class MenuListDtoAll {
    private Integer id;
    private String path;
    private String label;
    private String component;
    private String redirect;
    private Integer parentId;
    private Map<String,Object> meta;
    private List<MenuListDtoAll> children;
 
    // Getters and Setters
 
    public void setMeta(String metaJson) {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            this.meta = objectMapper.readValue(metaJson, new TypeReference<Map<String, Object>>() {});
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    public MenuListDtoAll() {
        this.children = new ArrayList<>();
    }
 
    // Add other necessary constructors and methods
}