When selecting the same column for indicator and color, the widget will display normally, and the download error will occur #1336
Description
When selecting the same column for indicator and color, the widget will display normally, and the download error will occur
2019-11-22 16:42:37.813 ERROR 2596 --- [ sheet-worker-4] c.b.d.service.excel.SheetWorker : sheet worker error, task=DownloadTask_3, context=SheetContext{executeSql=[], querySql=[SELECT
性别
,性别
,
count(人数
) AS 'count(人数)'
FROM (SELECT id as 人数, student_number as 学号, student_name as 姓名, gender as 性别, birthday as 出生日期, nation as 民族, province as 省份, city as 城市, department as 院系, major as 专业, total_score as 高考成绩 from student as 学生) T
GROUP BY 性别
,性别
], totalColumns=null, queryColumns=null, excludeColumns=null, sheet=org.apache.poi.xssf.streaming.SXSSFSheet@2273e69c, workbook=org.apache.poi.xssf.streaming.SXSSFWorkbook@ceeda3c, contain=false, sqlUtils=com.boxy.core.utils.SqlUtils@22935d1, isTable=false, excelHeaders=null, dashboardId=null, widgetId=3, name='性别', sheetNo=1, wrapper=MsgWrapper(msg=DownloadRecord(id=5, userId=2), action=DOWNLOAD, rst=null, xId=5, xUUID=null), resultLimit=1000000, taskKey='DownloadTask_3'}, error={}
org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [SELECT * FROM (SELECT
性别
,性别
,
count(人数
) AS 'count(人数)'
FROM (SELECT id as 人数, student_number as 学号, student_name as 姓名, gender as 性别, birthday as 出生日期, nation as 民族, province as 省份, city as 城市, department as 院系, major as 专业, total_score as 高考成绩 from student as 学生) T
GROUP BY 性别
,性别
) MT WHERE 1=0]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name '性别'
at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:93)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1402)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTempl