1.1.19版本报错,退回1.1.18版本正常
mybatis-plus和druid版本
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
<version>2.0.6-jdk8</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.19</version>
</dependency>
代码:
void deleteRefreshRptData(@Param("rptDate") String rptDate,
@Param("corpId") Integer corpId);
<delete id="deleteRefreshRptData">
DELETE FROM rpt_data
WHERE 1=1
<if test="null != corpId">
AND corp_id = #{corpId}
</if>
AND rpt_date = #{rptDate}
</delete>
错误信息
mybatis-plus init success.
log4j:WARN No appenders could be found for logger (org.apache.ibatis.logging.LogFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
connect success
[2019-08-02 11:37:22][ERROR][druid.sql.Statement][statementLogError][149][][] -> {conn-10050, pstmt-20001} execute error. delete from rp
t_datawhere 1 = 1
and rpt_date = '2019-08-01'
java.sql.SQLException: non support sql
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2547)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2505)
at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:840)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:740)
at com.mysql.jdbc.StatementImpl$CancelTask$1.run(StatementImpl.java:119)
[2019-08-02 11:37:22][ERROR][cn.ttttt.task.RptTask][runRptDateCount][66][][] -> 统计行程异常:nested exception is org.apache.ibat
is.exceptions.PersistenceException: ### Error updating database. Cause: java.lang.RuntimeException: SQL fail Time:18908 ms ID:cn.ttttt.mapper.RptDataMapper.delete
RefreshRptData Execute SQL: DELETE
FROM
rpt_data
WHERE
1=1
AND rpt_date = '2019-08-01'
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: DELETE FROM rpt_data WHERE 1=1 AND rpt_date = ?
### Cause: java.lang.RuntimeException: SQL fail Time:18908 ms ID:cn.ttttt.mapper.RptDataMapper.deleteRefreshRptData Execute SQL
: DELETE
FROM
rpt_data
WHERE
1=1
AND rpt_date = '2019-08-01'
1条答案
按热度按时间uqcuzwp81#
其他版本信息