refactor: 代码格式调整

This commit is contained in:
taojinlong 2022-09-27 10:17:32 +08:00
parent 3b29694684
commit a900d71849
2 changed files with 10 additions and 10 deletions

View File

@ -114,11 +114,11 @@ public class MysqlQueryProvider extends QueryProvider {
if (f.getDeType() == 2 || f.getDeType() == 3) {
fieldName = String.format(MySQLConstants.UNIX_TIMESTAMP, originField) + "*1000";
} else {
if(f.getType().equalsIgnoreCase("YEAR")){
if (f.getType().equalsIgnoreCase("YEAR")) {
fieldName = String.format(MySQLConstants.DATE_FORMAT, "CONCAT(" + originField + ",'-01-01')", MySQLConstants.DEFAULT_DATE_FORMAT);
}else if(f.getType().equalsIgnoreCase("TIME")){
} else if (f.getType().equalsIgnoreCase("TIME")) {
fieldName = String.format(MySQLConstants.DATE_FORMAT, "CONCAT(1970-01-01 " + originField + ")", MySQLConstants.DEFAULT_DATE_FORMAT);
}else {
} else {
fieldName = String.format(MySQLConstants.DATE_FORMAT, originField, MySQLConstants.DEFAULT_DATE_FORMAT);
}
}
@ -173,11 +173,11 @@ public class MysqlQueryProvider extends QueryProvider {
if (f.getDeType() == 2 || f.getDeType() == 3) {
fieldName = String.format(MySQLConstants.UNIX_TIMESTAMP, originField) + "*1000";
} else {
if(f.getType().equalsIgnoreCase("YEAR")){
if (f.getType().equalsIgnoreCase("YEAR")) {
fieldName = String.format(MySQLConstants.DATE_FORMAT, "CONCAT(" + originField + ",'-01-01')", MySQLConstants.DEFAULT_DATE_FORMAT);
}else if(f.getType().equalsIgnoreCase("TIME")){
} else if (f.getType().equalsIgnoreCase("TIME")) {
fieldName = String.format(MySQLConstants.DATE_FORMAT, "CONCAT(1970-01-01 " + originField + ")", MySQLConstants.DEFAULT_DATE_FORMAT);
}else {
} else {
fieldName = String.format(MySQLConstants.DATE_FORMAT, originField, MySQLConstants.DEFAULT_DATE_FORMAT);
}
}
@ -1137,11 +1137,11 @@ public class MysqlQueryProvider extends QueryProvider {
if (x.getDeType() == 2 || x.getDeType() == 3) {
fieldName = String.format(MySQLConstants.UNIX_TIMESTAMP, originField) + "*1000";
} else if (x.getDeType() == 1) {
if(x.getType().equalsIgnoreCase("YEAR")){
if (x.getType().equalsIgnoreCase("YEAR")) {
fieldName = String.format(MySQLConstants.DATE_FORMAT, "CONCAT(" + originField + ",'-01-01')", transDateFormat(x.getDateStyle(), x.getDatePattern()));
}else if(x.getType().equalsIgnoreCase("TIME")){
} else if (x.getType().equalsIgnoreCase("TIME")) {
fieldName = String.format(MySQLConstants.DATE_FORMAT, "CONCAT(1970-01-01 " + originField + ")", MySQLConstants.DEFAULT_DATE_FORMAT);
}else {
} else {
String format = transDateFormat(x.getDateStyle(), x.getDatePattern());
fieldName = String.format(MySQLConstants.DATE_FORMAT, originField, format);
}

View File

@ -1790,7 +1790,7 @@ export default {
driver_name: 'Driver name:',
drive_type: 'Drive type',
add_driver: 'Add driver',
diver_on_the_left: 'Please select drive on the left',
diver_on_the_left: 'Please select the driver on the left',
no_data_table: 'No data table',
on_the_left: 'Please select the data source on the left',
table_name: 'Table name:',