select bt.id, bt.com_id, sd.dept_name as com_name, bt.project_id, pi.project_name, bt.tem_name, bt.tem_type, bt.tem_path, bt.is_del, bt.create_by, bt.create_time, bt.update_by, bt.update_time, bt.remark from bas_template bt left join pro_project_info pi on pi.id = bt.project_id left join sys_dept sd on sd.dept_id = bt.com_id insert into bas_template com_id, project_id, tem_name, tem_type, tem_path, is_del, create_by, create_time, update_by, update_time, remark, #{comId}, #{projectId}, #{temName}, #{temType}, #{temPath}, #{isDel}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remark}, update bas_template com_id = #{comId}, project_id = #{projectId}, tem_name = #{temName}, tem_type = #{temType}, tem_path = #{temPath}, is_del = #{isDel}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, remark = #{remark}, where id = #{id} delete from bas_template where id = #{id} delete from bas_template where id in #{id}