fix: RDS数据源的SQL数据集制作的视图,使用时间过滤组件过滤后视图数据为空 #5431

This commit is contained in:
zhaoqian 2023-07-03 14:03:27 +08:00
parent b5c9e9e417
commit 8c6ca5b5b8

View File

@ -1065,7 +1065,7 @@ public class MysqlQueryProvider extends QueryProvider {
if (field.getDeType() == 1) {
String format = transDateFormat(request.getDateStyle(), request.getDatePattern());
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5 || field.getDeExtractType() == 1) {
String date = String.format(MySQLConstants.STR_TO_DATE, originName, StringUtils.isNotEmpty(field.getDateFormat()) ? field.getDateFormat() : MysqlConstants.DEFAULT_DATE_FORMAT);
String date = String.format(MySQLConstants.DATE_FORMAT, originName, StringUtils.isNotEmpty(field.getDateFormat()) ? field.getDateFormat() : MysqlConstants.DEFAULT_DATE_FORMAT);
if(request.getOperator().equals("between")){
whereName = date;
}else {