select id,is_auto, video_get_status, qw_user_id,server_id,server_status,ipad_status,config_id,vid,uid,contact_way,app_key, qw_user_name, department, openid, company_id, company_user_id, corp_id, status, is_del, welcome_text, welcome_image, is_send_msg,app_key,qw_hook_id,fastGpt_role_id,login_status,tool_status,login_code_url,version from qw_user
        
    
    
    
    
        insert into qw_user
        
            qw_user_id,
            qw_user_name,
            department,
            openid,
            company_id,
            company_user_id,
            corp_id,
            status,
            is_del,
            welcome_text,
            welcome_image,
            is_send_msg,
            contact_way,
            config_id,
            app_key,
            qw_hook_id,
            fastGpt_role_id,
            login_status,
            tool_status,
            login_code_url,
            version,
            vid,
            uid,
            ipad_status,
            server_id,
            server_status,
            is_auto,
            video_get_status,
         
        
            #{qwUserId},
            #{qwUserName},
            #{department},
            #{openid},
            #{companyId},
            #{companyUserId},
            #{corpId},
            #{status},
            #{isDel},
            #{welcomeText},
            #{welcomeImage},
            #{isSendMsg},
            #{contactWay},
            #{configId},
            #{appKey},
            #{qwHookId},
            #{fastGptRoleId},
            #{loginStatus},
            #{tool_status},
            #{version},
            #{vid},
            #{uid},
            #{ipadStatus},
            #{serverId},
            #{isAuto},
            #{videoGetStatus},
         
    
    
        update qw_user
        
            qw_user_id = #{qwUserId},
            qw_user_name = #{qwUserName},
            department = #{department},
            openid = #{openid},
            company_id = #{companyId},
            company_user_id = #{companyUserId},
            corp_id = #{corpId},
            status = #{status},
            is_del = #{isDel},
            welcome_text = #{welcomeText},
            welcome_image = #{welcomeImage},
            is_send_msg = #{isSendMsg},
            contact_way = #{contactWay},
            config_id = #{configId},
            app_key = #{appKey},
            qw_hook_id = #{qwHookId},
            fastGpt_role_id = #{fastGptRoleId},
            login_status = #{loginStatus},
            tool_status = #{toolStatus},
            login_code_url = #{loginCodeUrl},
            version = #{version},
            `vid` = #{vid},
            uid = #{uid},
            ipad_status = #{ipadStatus},
            server_id = #{serverId},
            server_status = #{serverStatus},
            is_auto = #{isAuto},
            video_get_status = #{videoGetStatus},
        
        where id = #{id}
    
    
        update qw_user set login_status = #{loginStatus},remark = NULL
        ,version = #{version} 
        where app_key = #{appKey}
    
    
        update qw_user set tool_status = #{toolStatus}
        where app_key = #{appKey}
    
    
        update qw_user set login_code_url = #{loginCodeUrl}
        where app_key = #{appKey}
    
    
        update qw_user set status = 0 , is_del= 2 , company_user_id=null where company_user_id in
        
            #{userId}
        
    
    
        delete from qw_user where id = #{id}
    
    
        delete from qw_user where id in
        
            #{id}
        
    
    
    
    
    
        update qw_user set send_msg_type = #{type} where id in #{item}