select msg_id, session_id,prompt_tokens,completion_tokens,total_tokens, ext_id, user_id, content, msg_type, send_type, company_id, role_id, company_user_id, create_time, msg_json, status, nick_name, avatar, user_type from fastgpt_chat_msg insert into fastgpt_chat_msg msg_id, session_id, ext_id, user_id, content, msg_type, send_type, company_id, role_id, company_user_id, create_time, msg_json, status, nick_name, avatar, user_type, prompt_tokens, completion_tokens, total_tokens, #{msgId}, #{sessionId}, #{extId}, #{userId}, #{content}, #{msgType}, #{sendType}, #{companyId}, #{roleId}, #{companyUserId}, #{createTime}, #{msgJson}, #{status}, #{nickName}, #{avatar}, #{userType}, #{promptTokens}, #{completionTokens}, #{totalTokens}, update fastgpt_chat_msg session_id = #{sessionId}, ext_id = #{extId}, user_id = #{userId}, content = #{content}, msg_type = #{msgType}, send_type = #{sendType}, company_id = #{companyId}, role_id = #{roleId}, company_user_id = #{companyUserId}, create_time = #{createTime}, msg_json = #{msgJson}, status = #{status}, nick_name = #{nickName}, avatar = #{avatar}, user_type = #{userType}, prompt_tokens = #{promptTokens}, completion_tokens = #{completionTokens}, total_tokens = #{totalTokens}, where msg_id = #{msgId} delete from fastgpt_chat_msg where msg_id = #{msgId} delete from fastgpt_chat_msg where msg_id in #{msgId}