id
,file_name
,content_type
,length
,obj_id
,storage_path
,business_code
,over_time
,created_by
,created_time
,is_deleted
,status
,tenant_id
,new_file
attachment${tableSuffix}
delete from
where id = #{id,jdbcType=VARCHAR}
delete from
where id in
#{idItem, jdbcType=VARCHAR}
delete from
id = #{id,jdbcType=VARCHAR}
AND id=#{id,jdbcType=VARCHAR}
AND file_name=#{fileName,jdbcType=VARCHAR}
AND content_type=#{contentType,jdbcType=VARCHAR}
AND length=#{length,jdbcType=BIGINT}
AND obj_id=#{objId,jdbcType=VARCHAR}
AND storage_path=#{storage_path,jdbcType=VARCHAR}
AND business_code=#{businessCode,jdbcType=VARCHAR}
AND over_time=#{overTime,jdbcType=TIMESTAMP}
AND created_by=#{createdBy,jdbcType=VARCHAR}
AND created_time=#{createdTime,jdbcType=TIMESTAMP}
AND is_deleted=#{deleted,jdbcType=BIT}
AND status=#{status,jdbcType=INTEGER}
AND tenant_id=#{tenantId,jdbcType=VARCHAR}
insert into
id,
file_name,
content_type,
length,
obj_id,
storage_path,
business_code,
over_time,
created_by,
created_time,
is_deleted,
status,
tenant_id,
new_file,
#{id, jdbcType=VARCHAR},
#{fileName, jdbcType=VARCHAR},
#{contentType, jdbcType=VARCHAR},
#{length, jdbcType=BIGINT},
#{objId,jdbcType=VARCHAR},
#{storagePath,jdbcType=VARCHAR},
#{businessCode,jdbcType=VARCHAR},
#{overTime,jdbcType=TIMESTAMP},
#{createdBy, jdbcType=VARCHAR},
#{createdTime, jdbcType=TIMESTAMP},
#{deleted, jdbcType=BIT},
#{status, jdbcType=INTEGER},
#{tenantId, jdbcType=VARCHAR},
#{newFile, jdbcType=VARCHAR},
insert into
id,
file_name,
content_type,
length,
obj_id,
storage_path,
business_code,
over_time,
created_by,
created_time,
is_deleted,
status,
tenant_id,
new_file,
values
#{item.id, jdbcType=VARCHAR},
#{item.fileName, jdbcType=VARCHAR},
#{item.contentType, jdbcType=VARCHAR},
#{item.length, jdbcType=BIGINT},
#{item.objId, jdbcType=VARCHAR},
#{item.storagePath, jdbcType=VARCHAR},
#{item.businessCode, jdbcType=VARCHAR},
#{item.overTime, jdbcType=TIMESTAMP},
#{item.createdBy, jdbcType=VARCHAR},
#{item.createdTime, jdbcType=TIMESTAMP},
#{item.deleted, jdbcType=BIT},
#{item.status, jdbcType=INTEGER},
#{item.tenantId, jdbcType=VARCHAR},
#{item.newFile, jdbcType=VARCHAR},
update
file_name = #{fileName, jdbcType=VARCHAR},
content_type = #{contentType, jdbcType=VARCHAR},
length = #{length, jdbcType=BIGINT},
obj_id = #{objId, jdbcType=VARCHAR},
storage_path = #{storagePath, jdbcType=VARCHAR},
business_code = #{businessCode, jdbcType=VARCHAR},
over_time = #{overTime, jdbcType=TIMESTAMP},
created_by = #{createdBy, jdbcType=VARCHAR},
created_time = #{createdTime, jdbcType=TIMESTAMP},
is_deleted = #{deleted, jdbcType=BIT},
status = #{status, jdbcType=INTEGER},
tenant_id = #{tenantId, jdbcType=VARCHAR},
new_file = #{newFile, jdbcType=VARCHAR},
where id = #{id,jdbcType=VARCHAR}