select id, type, content, session_id, user_id, target_id, create_by, create_time, update_by, update_time from ard_call_history SELECT ach.ID, ach.TYPE, ach.CONTENT, ach.session_id, ach.user_id, ach.target_id, ach.create_by, ach.create_time, ach.update_by, ach.update_time, u.nick_name, u.avatar, u1.nick_name AS target_nick_name, u1.avatar AS target_avatar FROM ard_call_history ach LEFT JOIN sys_user u ON u.user_id = ach.user_id LEFT JOIN sys_user u1 ON u1.user_id = ach.target_id insert into ard_call_history id, type, content, session_id, user_id, target_id, create_by, create_time, update_by, update_time, #{id}, #{type}, #{content}, #{sessionId}, #{userId}, #{targetId}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, update ard_call_history type = #{type}, content = #{content}, session_id = #{sessionId}, user_id = #{userId}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, where id = #{id} delete from ard_call_history where id = #{id} delete from ard_call_history where id in #{id}