Metrics
0
Watch 2.6k Star 5k Fork 2.5k

ThinkGem / JeeSite 4.xJavaAGPL-3.0

jeesite左连接的使用

Closed
Saito_Li  Created at

问题

当前表想使用左连接关联另外一个表的一个字段,实体类里面需要加这个字段的属性定义么?
还有就是log发现执行查出来了数据,但是页面显示不出来,可能是我前端不熟导致的,想请教一下。

我的做法

左连接:
输入图片说明
类属性:
输入图片说明
list页面:
输入图片说明
输入图片说明
查询结果:
01-10 23:50:47.760 DEBUG [com.jeesite.modules.users.dao.UsersDao.findList] - ==> Preparing: SELECT a.id AS "id", a.type AS "type", a.affiliation AS "affiliation", a.attributes AS "attributes", a.state AS "state", a.max_enrollments AS "maxEnrollments", a.token AS "token", a.level AS "level", c.pem AS "certificates.pem" FROM users a LEFT JOIN certificates c ON a.id=c.id ORDER BY a.id DESC LIMIT 20
01-10 23:50:47.760 DEBUG [com.jeesite.modules.users.dao.UsersDao.findList] - ==> Parameters:
01-10 23:50:47.780 DEBUG [com.jeesite.modules.users.dao.UsersDao.findList] - <== Total: 2

结果显示不出来:
输入图片说明

2339039_bei3ke total 2 participants

Comments (2)

2339039_bei3ke
bei3ke 2019-01-11 10:46

看你这是返回没用list接收数据啊;

Saito_Li 2019-01-11 11:31

@bei3ke
证书那个div里少了一个form,问题解决了 :relaxed:

Sign in and comment

Assignee
Labels
Not set
Project
Milestone
Branch
Scheduled start
Not set
Scheduled end
Not set
Top level
Priority

Help Search