id,url,serial_number,
name,reference,dep_id,
aid,status,type,
create_time,update_time
delete from standard_document
where id = #{id,jdbcType=INTEGER}
insert into standard_document
( id,url,serial_number
,name,reference,dep_id
,aid,status,type
,create_time,update_time)
values (#{id,jdbcType=INTEGER},#{url,jdbcType=VARCHAR},#{serialNumber,jdbcType=VARCHAR}
,#{name,jdbcType=VARCHAR},#{reference,jdbcType=VARCHAR},#{depId,jdbcType=VARCHAR}
,#{aid,jdbcType=VARCHAR},#{status,jdbcType=INTEGER},#{type,jdbcType=INTEGER}
,#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
insert into standard_document
id,url,serial_number,name,reference,dep_id,aid,status,type,create_time,update_time,#{id,jdbcType=INTEGER},#{url,jdbcType=VARCHAR},#{serialNumber,jdbcType=VARCHAR},#{name,jdbcType=VARCHAR},#{reference,jdbcType=VARCHAR},#{depId,jdbcType=VARCHAR},#{aid,jdbcType=VARCHAR},#{status,jdbcType=INTEGER},#{type,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},
update standard_document
url = #{url,jdbcType=VARCHAR},
serial_number = #{serialNumber,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
reference = #{reference,jdbcType=VARCHAR},
dep_id = #{depId,jdbcType=VARCHAR},
aid = #{aid,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
where id = #{id,jdbcType=INTEGER}
update standard_document
set
url = #{url,jdbcType=VARCHAR},
serial_number = #{serialNumber,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
reference = #{reference,jdbcType=VARCHAR},
dep_id = #{depId,jdbcType=VARCHAR},
aid = #{aid,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
and a.status = #{status,jdbcType=INTEGER}
and a.update_time between #{startTime,jdbcType=TIMESTAMP} and #{endTime,jdbcType=TIMESTAMP}
and a.dep_id = #{depId,jdbcType=VARCHAR}
and a.name like concat('%',#{name,jdbcType=VARCHAR},'%')