mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-04-30 04:54:25 +08:00
Compare commits
4 Commits
6439b1afc9
...
236b9c75d3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
236b9c75d3 | ||
|
|
8abfc923a0 | ||
|
|
668f872743 | ||
|
|
acb9cef64e |
@@ -225,7 +225,7 @@ public class SqlSelectHelper {
|
|||||||
public static Select getSelect(String sql) {
|
public static Select getSelect(String sql) {
|
||||||
Statement statement = null;
|
Statement statement = null;
|
||||||
try {
|
try {
|
||||||
statement = CCJSqlParserUtil.parse(sql);
|
statement = CCJSqlParserUtil.parse(sql, parser -> parser.withTimeOut(20000));
|
||||||
} catch (JSQLParserException e) {
|
} catch (JSQLParserException e) {
|
||||||
log.error("parse error, sql:{}", sql, e);
|
log.error("parse error, sql:{}", sql, e);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -32,7 +32,7 @@
|
|||||||
<maven.compiler.source>21</maven.compiler.source>
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
<maven.compiler.target>21</maven.compiler.target>
|
<maven.compiler.target>21</maven.compiler.target>
|
||||||
<file.encoding>UTF-8</file.encoding>
|
<file.encoding>UTF-8</file.encoding>
|
||||||
<jsqlparser.version>4.7</jsqlparser.version>
|
<jsqlparser.version>4.9</jsqlparser.version>
|
||||||
<pagehelper.version>6.1.0</pagehelper.version>
|
<pagehelper.version>6.1.0</pagehelper.version>
|
||||||
<pagehelper.spring.version>2.1.0</pagehelper.spring.version>
|
<pagehelper.spring.version>2.1.0</pagehelper.spring.version>
|
||||||
<mybatis.version>3.5.3</mybatis.version>
|
<mybatis.version>3.5.3</mybatis.version>
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ const BarChart: React.FC<Props> = ({
|
|||||||
return value === 0
|
return value === 0
|
||||||
? 0
|
? 0
|
||||||
: metricField.dataFormatType === 'percent'
|
: metricField.dataFormatType === 'percent'
|
||||||
? `${formatByDecimalPlaces(value, metricField.dataFormat?.decimalPlaces || 2)}%`
|
? `${formatByDecimalPlaces(metricField.dataFormat?.needMultiply100 ? +value * 100 : value, metricField.dataFormat?.decimalPlaces || 2)}%`
|
||||||
: getFormattedValue(value);
|
: getFormattedValue(value);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -116,7 +116,7 @@ const BarChart: React.FC<Props> = ({
|
|||||||
: metricField.dataFormatType === 'percent' ||
|
: metricField.dataFormatType === 'percent' ||
|
||||||
metricField.dataFormatType === 'decimal'
|
metricField.dataFormatType === 'decimal'
|
||||||
? `${formatByDecimalPlaces(
|
? `${formatByDecimalPlaces(
|
||||||
item.value,
|
metricField.dataFormat?.needMultiply100 ? +item.value * 100 : item.value,
|
||||||
metricField.dataFormat?.decimalPlaces || 2
|
metricField.dataFormat?.decimalPlaces || 2
|
||||||
)}${metricField.dataFormatType === 'percent' ? '%' : ''}`
|
)}${metricField.dataFormatType === 'percent' ? '%' : ''}`
|
||||||
: getFormattedValue(item.value)
|
: getFormattedValue(item.value)
|
||||||
@@ -151,7 +151,7 @@ const BarChart: React.FC<Props> = ({
|
|||||||
return value === 0
|
return value === 0
|
||||||
? 0
|
? 0
|
||||||
: metricField.dataFormatType === 'percent'
|
: metricField.dataFormatType === 'percent'
|
||||||
? `${formatByDecimalPlaces(value, metricField.dataFormat?.decimalPlaces || 2)}%`
|
? `${formatByDecimalPlaces(metricField.dataFormat?.needMultiply100 ? +value * 100 : value, metricField.dataFormat?.decimalPlaces || 2)}%`
|
||||||
: getFormattedValue(value);
|
: getFormattedValue(value);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user