select photo_id, file_name, photo_path, photo_url, original_name, upload_name, upload_dept, upload_time, status from fms_photo
insert into fms_photo
photo_id,
file_name,
photo_path,
photo_url,
original_name,
upload_name,
upload_dept,
upload_time,
status,
(select ifnull(max(photo_id),0) + 1 from fms_photo),
#{fileName},
#{photoPath},
#{photoUrl},
#{originalName},
#{uploadName},
#{uploadDept},
now(),
0,
update fms_photo
file_name = #{fileName},
photo_path = #{photoPath},
photo_url = #{photoUrl},
original_name = #{originalName},
upload_name = #{uploadName},
upload_dept = #{uploadDept},
upload_time = #{uploadTime},
status = #{status},
where photo_id = #{photoId}
delete from fms_photo where photo_id = #{photoId}
delete from fms_photo where photo_id in
#{photoId}