select ad_id, ad_code, ad_name, width, height, status, user_id, dept_id, description, create_by, create_time from cms_ad insert into cms_ad ad_code, ad_name, width, height, status, user_id, dept_id, description, create_by, create_time, #{adCode}, #{adName}, #{width}, #{height}, #{status}, #{userId}, #{deptId}, #{description}, #{createBy}, #{createTime}, update cms_ad ad_code = #{adCode}, ad_name = #{adName}, width = #{width}, height = #{height}, status = #{status}, user_id = #{userId}, dept_id = #{deptId}, description = #{description}, create_by = #{createBy}, create_time = #{createTime}, where ad_id = #{adId} delete from cms_ad where ad_id = #{adId} delete from cms_ad where ad_id in #{adId} select id,ad_id,material_id,link,sort,hit,start_time,end_time,status,use_his_id from cms_ad_material insert into cms_ad_material ad_id, material_id, link, sort, hit, start_time, end_time, status, use_his_id, #{adId}, #{materialId}, #{link}, #{sort}, #{hit}, #{startTime}, #{endTime}, #{status}, #{useHisId}, update cms_ad_material ad_id = #{adId}, material_id = #{materialId}, link = #{link}, sort = #{sort}, hit = #{hit}, start_time = #{startTime}, end_time = #{endTime}, status = #{status}, use_his_id = #{useHisId}, where id = #{id} delete from cms_ad_material where id in #{id} select a.material_id, a.group_id, a.material_name, a.material_type, a.description, a.material_size, a.save_path, a.thumbnail, a.audit_state, a.audit_reason, a.use_state, a.width, a.height, a.uploader_id, a.upload_time, a.remark from cms_material a inner join cms_material_group b on a.group_id=b.group_id