select a.id, a.type, a.full_name, a.short_name, a.face_value, a.issue_date,a.mintage,a.composition,
a.issue_year, a.series, a.set_number, a.block_type, a.shape, a.create_by,
a.create_time, a.update_by, a.update_time, a.del_flag, a.remark,
a.weight, a.dimension, a.thickness, a.coin_teeth,
b.id as sub_id, b.collect_id as sub_collect_id, b.catelog as sub_catelog, b.file_name as sub_file_name,
b.name as sub_name, b.create_by as sub_create_by, b.create_time as sub_create_time, b.url as sub_url
from col_commemorative_coin a
left join col_collect_file b on b.collect_id=a.id
insert into col_commemorative_coin
id,type,full_name,short_name,face_value,issue_date,issue_year,series,set_number,block_type,shape,create_by,create_time,update_by,update_time,del_flag,remark,mintage,composition,weight,dimension,thickness,coin_teeth,#{id},#{type},#{fullName},#{shortName},#{faceValue},#{issueDate},#{issueYear},#{series},#{setNumber},#{blockType},#{shape},#{createBy},#{createTime},#{updateBy},#{updateTime},#{delFlag},#{remark},#{mintage},#{composition},#{weight},#{dimension},#{thickness},#{coinTeeth},
update col_commemorative_coin
type = #{type},full_name = #{fullName},short_name = #{shortName},face_value = #{faceValue},issue_date = #{issueDate},issue_year = #{issueYear},series = #{series},set_number = #{setNumber},block_type = #{blockType},shape = #{shape},create_by = #{createBy},create_time = #{createTime},update_by = #{updateBy},update_time = #{updateTime},del_flag = #{delFlag},remark = #{remark},mintage = #{mintage},composition = #{composition},weight = #{weight},dimension = #{dimension},thickness = #{thickness},coin_teeth = #{coinTeeth},
where id = #{id}
delete from col_commemorative_coin where id = #{id}
delete from col_commemorative_coin where id in
#{id}
update col_commemorative_coin set del_flag='1' where id = #{id}
update col_commemorative_coin set del_flag='1' where id in
#{id}