easychat-server icon indicating copy to clipboard operation
easychat-server copied to clipboard

查询聊天信息列表报错

Open aqz236 opened this issue 2 years ago • 6 comments

刷新页面时会报错

### 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 avatar Feb 11 '23 13:02 aqz236

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

aqz236 avatar Feb 11 '23 13:02 aqz236

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

aqz236 avatar Feb 11 '23 13:02 aqz236

刷新页面时会报错

### 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 以上版本

toollong avatar Feb 11 '23 13:02 toollong

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

aqz236 avatar Feb 11 '23 14:02 aqz236

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

guobin1234 avatar May 23 '23 09:05 guobin1234

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

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

toollong avatar May 23 '23 10:05 toollong