NutzCN Logo
问答 数据发送到浏览器时数据为nul的字段被忽略了
发布于 2657天前 作者 qq_117e429a 1551 次浏览 复制 上一个帖子 下一个帖子
标签:
Sql sql = Sqls.create("select d.did,d.dname dname,d.pdid,d.cindex,pd.dname pdname from Ddept d LEFT JOIN DDEPT pd  on d.pdid = pd.did ORDER BY d.cindex");
			sql.setCallback(Sqls.callback.records());
			dao.execute(sql);
			List<Record> list = sql.getList(Record.class);
 "list": [
    {
      "did": 44,
      "dname": "业务部",
      "pdid": 41,
      "cindex": 1,
      "pdname": "行政部"
    },
    {
      "did": 45,
      "dname": "售后部",
      "pdid": 0,
      "cindex": 1
    },
    {
      "did": 51,
      "dname": "asdsa",
      "pdid": 49,
      "cindex": 1,
      "pdname": "阿"
    },
    {
      "did": 41,
      "dname": "行政部",
      "pdid": 0,
      "cindex": 2
    },
    {
      "did": 42,
      "dname": "人事",
      "pdid": 41,
      "cindex": 2,
      "pdname": "行政部"
    },
    {
      "did": 49,
      "dname": "阿",
      "pdid": 44,
      "cindex": 2,
      "pdname": "业务部"
    },
    {
      "did": 50,
      "dname": "122",
      "pdid": 41,
      "cindex": 121,
      "pdname": "行政部"
    }
  ],

pdname为null的没显示

1 回复
@Ok("json:full")
添加回复
请先登陆
回到顶部