id, file_name, file_path, file_type, file_length, parent_id, level
and file_name = #{fileName,jdbcType=VARCHAR}
and file_path = #{filePath,jdbcType=VARCHAR}
and file_type = #{fileType,jdbcType=VARCHAR}
and file_length = #{fileLength,jdbcType=INTEGER}
and parent_id = #{parentId,jdbcType=INTEGER}
and level = #{level,jdbcType=INTEGER}
select seq from sqlite_sequence WHERE name = 'temp_plate_file'
insert into temp_plate_file (file_name, file_path, file_type,
file_length, parent_id, level
)
values (#{fileName,jdbcType=VARCHAR}, #{filePath,jdbcType=VARCHAR}, #{fileType,jdbcType=VARCHAR},
#{fileLength,jdbcType=INTEGER}, #{parentId,jdbcType=INTEGER}, #{level,jdbcType=INTEGER}
)
select seq from sqlite_sequence WHERE name = 'temp_plate_file'
insert into temp_plate_file
file_name,
file_path,
file_type,
file_length,
parent_id,
level ,
#{fileName,jdbcType=VARCHAR},
#{filePath,jdbcType=VARCHAR},
#{fileType,jdbcType=VARCHAR},
#{fileLength,jdbcType=INTEGER},
#{parentId,jdbcType=INTEGER},
#{level,jdbcType=INTEGER},
update temp_plate_file
file_name = #{fileName,jdbcType=VARCHAR},
file_path = #{filePath,jdbcType=VARCHAR},
file_type = #{fileType,jdbcType=VARCHAR},
file_length = #{fileLength,jdbcType=INTEGER},
parent_id = #{parentId,jdbcType=INTEGER},
level = #{level,jdbcType=INTEGER},
where id = #{id,jdbcType=INTEGER}
update temp_plate_file
set file_name = #{fileName,jdbcType=VARCHAR},
file_path = #{filePath,jdbcType=VARCHAR},
file_type = #{fileType,jdbcType=VARCHAR},
file_length = #{fileLength,jdbcType=INTEGER},
parent_id = #{parentId,jdbcType=INTEGER},
level = #{level,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
delete from temp_plate_file
where id = #{id,jdbcType=INTEGER}
delete from temp_plate_file;
delete from sqlite_sequence WHERE name = 'temp_plate_file'
insert into temp_plate_file (file_name, file_path, file_type)
values
ifnull(#{item.fileName, jdbcType=VARCHAR}, ''),
ifnull(#{item.filePath, jdbcType=VARCHAR}, ''),
ifnull(#{item.fileType, jdbcType=VARCHAR}, '')
insert into t_plate_file (file_name, file_path, file_type)
select file_name, file_path, file_type from temp_plate_file temp
where not exists (select 1 from t_plate_file t where t.file_path = temp.file_path )