The front desk query passes the date format field to mybatis

报错 java.lang.IllegalArgumentException: invalid comparison: java.util.Date and java.lang.String

Processing method:

<if test="starttime != null"><![CDATA[ AND h.STARTTIME >= #{starttime,jdbcType=TIMESTAMP} ]]></if>




Be careful not to add in the if judgment
 
starttime! ='' Judgment
I am very grateful to the blog of the great god for solving the problem for me. The above is a personal summary

of the original address of the great god blog: https://blog.csdn.net/wanghailong_qd/article/details/50673144

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325772129&siteId=291194637