<!-- 查询:根据日期获取自增id最大的一条数据 -->
<select id="getMaxIdInfo" parameterType="map" resultType="map">
SELECT * FROM customer_data where 1 = 1
<if test = "null != date and '' != date">
and date = #{date}
</if>
ORDER BY id DESC LIMIT 1
</select>
【MyBatis】根据某个字段查询自增ID最大的一条数据案例(51)
于 2023-04-12 00:10:09 首次发布