src/main/resources/mapper/AppVersionMapper.xml
@@ -12,4 +12,18 @@ </resultMap> <select id="getLatestApp" resultMap="BaseResultMap"> select top 1 * from asr_app_version where type = #{type} and latest = 1 </select> <update id="updateLatest"> update asr_app_version set latest = #{latest} where 1 = 1 <if test="type != null || type != ''"> and type = #{type} </if> </update> </mapper>