常见线上故障的最优解法,运维老司机也未必都懂
复制<select id="selectOrders" resultType="com.***.Order" >
select * from user where 1=1 <if test=" orderID != null "> and order_id = #{orderID} </if >
<if test="userID !=null"> and user_id=#{userID} </if > <if test="startTime !=null"> and create_time >= #{createTime} </if > <if test="endTime !=null"> and create_time <= #{userID} </if > </select>
1.2.3.4.
THE END