写在前面 新的同事来之后问我 where 1=1 是什么意思,这样没意义啊,我笑了。今天来说明下。 where 1=1 先来看一段代码 <select id="queryBookInfo" parameterType="com.ths.platform.entity.BookInfo" resultType="java.lang.Integer"> select count(id) from t_book t where 1=1 <if test="title !=null and title !…