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

[Bug] PostgreSql 兼容错误 #94

Closed
3 tasks done
arneking opened this issue Oct 31, 2024 · 1 comment
Closed
3 tasks done

[Bug] PostgreSql 兼容错误 #94

arneking opened this issue Oct 31, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@arneking
Copy link

arneking commented Oct 31, 2024

Bug 描述

PostgreSql 没有 DATE() 函数, 查询语句设置别名不能省略 AS 关键词

复现步骤

continew-module-system/src/main/resources/mapper/LogMapper.xml
使用了 DATA() 函数

continew-module-system/src/main/java/top/continew/admin/system/mapper/FileMapper.java
省略了 AS 关键词

预期结果

单纯提交错误
data(value) 使用了 to_char(value,'YYYY-MM-DD') 替代, 但 mysql 没有此函数
AS 补上就好...

环境信息

ContiNew Admin version(s):3.3.0

额外补充

No response

确认

  • 阅读文档
  • 根据报错信息百度或 Google 一下
  • 搜索是否有其他人提交过类似的 issue,如果对应 issue 尚未解决,您可以先订阅关注该 issue(为了方便后来者查找问题解决方法,请尽量避免创建重复的 issue)
@arneking arneking added the bug Something isn't working label Oct 31, 2024
@Charles7c
Copy link
Member

1、关于仪表盘部分的 SQL,感谢给出方案。因为比较复杂,往往无法提供兼容性太强的 SQL,一般情况下如果切换数据库,那这部分就需要自己实现了,它们不是核心功能,甚至很大可能在实际开发时直接被砍掉。
2、我再次检查了下,FileMapper 似乎没有别名使用的 SQL。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants