select guid, title, srot, status, page, position, creator, create_time, updator, update_time from custom_image insert into custom_image guid, title, status, page, position, creator, create_time, updator, update_time, srot, #{guid}, #{title}, #{status}, #{page}, #{position}, #{creator}, #{createTime}, #{updator}, #{updateTime}, (select IFNULL((max(srot)+1), 1) as srot from custom_image tmp), update custom_image title = #{title}, srot = #{srot}, status = #{status}, page = #{page}, position = #{position}, creator = #{creator}, create_time = #{createTime}, updator = #{updator}, update_time = #{updateTime}, where guid = #{guid} update custom_image set srot = #{srot} where srot = #{key} delete from custom_image where guid = #{guid} delete from custom_image where guid in #{guid}