You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lts-admin登入后台后,点击日志/节点上下线日志菜单,默认无条件搜索正常,但是当节点组输入某个字符串时,点击搜索,则会弹出一个错误展示层,经过查看日志记录,发现是lts-admin的一个sql bug。
错误代码坐标:com.github.ltsopensource.admin.access.mysql.MysqlBackendNodeOnOfflineLogAccess#buildWhereSql 99行。
报错信息:
com.github.ltsopensource.store.jdbc.exception.JdbcException: Select SQL Error:
SELECT
COUNT(1)
FROM
`lts_admin_node_onoffline_log`
WHERE
GROUP = ?
AND event = ?
AND (
log_time BETWEEN ? AND ?
)
at com.github.ltsopensource.store.jdbc.builder.SelectSql.single(SelectSql.java:273)
at com.github.ltsopensource.admin.access.mysql.MysqlBackendNodeOnOfflineLogAccess.count(MysqlBackendNodeOnOfflineLogAccess.java:83)
at com.github.ltsopensource.admin.web.api.NodeApi.getNodeOnofflineLog(NodeApi.java:97)
at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:45005)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:817)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:731)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:968)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:870)`
lts-admin登入后台后,点击日志/节点上下线日志菜单,默认无条件搜索正常,但是当节点组输入某个字符串时,点击搜索,则会弹出一个错误展示层,经过查看日志记录,发现是lts-admin的一个sql bug。
错误代码坐标:com.github.ltsopensource.admin.access.mysql.MysqlBackendNodeOnOfflineLogAccess#buildWhereSql 99行。
报错信息:
com.github.ltsopensource.store.jdbc.exception.JdbcException: Select SQL Error:
SELECT
COUNT(1)
FROM
`lts_admin_node_onoffline_log`
WHERE
错误原因:
查询语句有个字段名group,但这个是个sql关键字,所以翻译后的sql无法被正确解析,故而报错。
解决方案:
第99行,
将
.andOnNotEmpty("group = ?", request.getGroup())
改为 .andOnNotEmpty("`group` = ?", request.getGroup())即可。
The text was updated successfully, but these errors were encountered: