Merge pull request #5575 from ZhaoQian1222/pr@dev@fix_rds_filter_is_null

fix: RDS数据源的SQL数据集制作的视图,使用时间过滤组件过滤后视图数据为空 #5431
This commit is contained in:
taojinlong 2023-07-03 16:57:41 +08:00 committed by GitHub
commit 80d272ce56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 {