Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQl数据集子查询不支持where条件过滤 #18

Closed
laijiao opened this issue Nov 12, 2020 · 4 comments
Closed

SQl数据集子查询不支持where条件过滤 #18

laijiao opened this issue Nov 12, 2020 · 4 comments

Comments

@laijiao
Copy link

laijiao commented Nov 12, 2020

image

@zhangdaiscott
Copy link
Member

请把错误也贴出来

@laijiao
Copy link
Author

laijiao commented Nov 13, 2020

image

系统执行浏览器报错:
{"success":false,"message":"操作失败,StatementCallback; bad SQL grammar [select * from (select xqmc,njdm,bjmc,a.xh,a.xm,if(py is null,'未提交','已提交') as zt,py,cx,txr\n from( select xqmc,xqdm,c.njdm,bjmc,xh,xm from jx_semester sm,xs_student sd\nLEFT JOIN jx_class c on c.bh=sd.bh\n) jeecg_rp_temp where 1=1]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4","code":500,"result":null,"timestamp":1605238791577}

image

@tygithub1
Copy link

tygithub1 commented Nov 20, 2020

1.新建一张测试表test_rp 数据如下:
image
2.编写sql 关联用户表查询:
select * from (select a.id,a.name,b.username from test_rp a join sys_user b on a.user = b.username ) t where t.username= 'admin'

3.查询正常:
image

因为我这边代码比较新,建议检查自己sql或是看看后续版本吧

@zhangdaiscott
Copy link
Member

按照这个文档集成最新版试试
https://my.oschina.net/jeecg/blog/4779874

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants