Sql sql = Sqls.create("select did id,dname name,pdid pId from Ddept");
sql.setCallback(Sqls.callback.records());
dao.execute(sql);
List<Record> list = sql.getList(Record.class);
return re.setv("list", list);
{
"list": [
{
"id": 41,
"name": "行政部",
"pid": 0
},
{
"id": 42,
"name": "人事",
"pid": 41
},
{
"id": 49,
"name": "阿",
"pid": 44
},
{
"id": 44,
"name": "业务部",
"pid": 41
},
{
"id": 45,
"name": "售后部",
"pid": 0
},
{
"id": 50,
"name": "122",
"pid": 41
},
{
"id": 51,
"name": "asdsa",
"pid": 49
}
]
}