A whole sql statement is passed in to report an error. If you want to understand the cause of this problem,
method:
public List < daily_defray_total > complexSqlQuery (String sql) {
return ddtMapper.complexSqlQuery (sql);
}
pass in the whole sql: here
String defrayTotalSql = " SELECT * FROM daily_defray_total ";
List<daily_defray_total> dailyDefrayTotalList = dailyDefrayTotalMapper.complexSqlQuery(defrayTotalSql);
in the xml file, both 1 and 2 have tried
1
< select id= "complexSqlQuery" resultMap= "BaseResultMap" parameterType= "String" >-sharp {0}
< / select >
2
< select id= "complexSqlQuery" resultMap= "BaseResultMap" parameterType= "java.lang.String" >-sharp {sql,jdbcType=VARCHAR}
< / select >
error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near""SELECT * FROM daily_defray_total""at line 1
is it really a grammatical error, or is it not introduced at all