refactor: 代码格式调整
This commit is contained in:
parent
3b29694684
commit
a900d71849
@ -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);
|
||||
}
|
||||
|
||||
@ -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:',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user