toollong / easychat-server

EasyChat 是基于 Spring Cloud + Vue + Socket.IO 实现在线聊天的即时通讯平台,此为后端部分,完整项目体验地址:https://toollong.icu ,仅供学习交流使用。
MIT License
21 stars 2 forks source link

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

Open aqz236 opened 1 year ago

aqz236 commented 1 year ago

刷新页面时会报错

### 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 commented 1 year ago

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

aqz236 commented 1 year ago

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

toollong commented 1 year ago

刷新页面时会报错

### 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 commented 1 year ago

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

guobin1234 commented 1 year ago

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

toollong commented 1 year ago

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

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