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

查询聊天信息列表报错 #1

Open
aqz236 opened this issue Feb 11, 2023 · 6 comments
Open

查询聊天信息列表报错 #1

aqz236 opened this issue Feb 11, 2023 · 6 comments

Comments

@aqz236
Copy link

aqz236 commented Feb 11, 2023

刷新页面时会报错

### Error querying database.  Cause: java.sql.SQLSyntaxErrorException: 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 'w   sender_id,
               first_value(history.receiver_id) over w receiver_i' at line 8
### The error may exist in file [C:\Users\SJ\Desktop\netty\easychat-server\easychat-chat\target\classes\mapper\ChatHistoryMapper.xml]
### The error may involve com.easychat.chat.mapper.ChatHistoryMapper.selectChatInfoList-Inline
### The error occurred while setting parameters
@aqz236
Copy link
Author

aqz236 commented Feb 11, 2023

好像是查询聊天列表(queryChatList)这个接口的问题

@aqz236
Copy link
Author

aqz236 commented Feb 11, 2023

image
老师,这个是mapper的SQL的问题吗

@toollong
Copy link
Owner

刷新页面时会报错

### Error querying database.  Cause: java.sql.SQLSyntaxErrorException: 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 'w   sender_id,
               first_value(history.receiver_id) over w receiver_i' at line 8
### The error may exist in file [C:\Users\SJ\Desktop\netty\easychat-server\easychat-chat\target\classes\mapper\ChatHistoryMapper.xml]
### The error may involve com.easychat.chat.mapper.ChatHistoryMapper.selectChatInfoList-Inline
### The error occurred while setting parameters

你 mysql 用的是哪个版本,这个sql中用到的函数需要 mysql 8.0 以上版本

@aqz236
Copy link
Author

aqz236 commented Feb 11, 2023

感谢,确实是mysql的版本问题,我的是5.6,更换8.0版本后问题解决,谢谢

@guobin1234
Copy link

image
请问老师,就是域名这些都改了,但是它本地运行后登录注册都没用是怎么回事?请问有什么好的解决方法嘛

@toollong
Copy link
Owner

image 请问老师,就是域名这些都改了,但是它本地运行后登录注册都没用是怎么回事?请问有什么好的解决方法嘛

按理说不会出现请求头过长的问题,你可以在Network中查看请求头哪个内容很长,如果无法避免的话,可以试试修改Nginx或者Tomcat的请求头大小设置

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