SELECT h.library_id, h.dept_id, h.risk_point, h.inspect_term, h.inspect_basis, h.library_name, h.library_content , d.`dept_name` FROM t_hidden_library h LEFT JOIN sys_dept d ON d.dept_id = h.dept_id insert into t_hidden_library dept_id, risk_point, inspect_term, inspect_basis, library_name, library_content, #{deptId}, #{riskPoint}, #{inspectTerm}, #{inspectBasis}, #{libraryName}, #{libraryContent}, update t_hidden_library dept_id = #{deptId}, risk_point = #{riskPoint}, inspect_term = #{inspectTerm}, inspect_basis = #{inspectBasis}, library_name = #{libraryName}, library_content = #{libraryContent}, where library_id = #{libraryId} delete from t_hidden_library where library_id = #{libraryId} delete from t_hidden_library where library_id in #{libraryId}