select id,
               address,
               code,
               guid,
               is_lock,
               manager,
               manager_phone,
               name,
               parent_id,
               phone,
               city_code,
               type,
               create_time,
               update_time,
               parent_guid,
               deleted,
               sort,
               create_by,
               update_by,
               weather_city_code,
               org_extend_id,
               source,
               short_name,
               remark,
               path
        from sys_org
    
    
    
    
    
    
        insert into sys_org
        
            
                address,
            
            
                code,
            
            
            
            
                guid,
            
            
                is_lock,
            
            
                manager,
            
            
                manager_phone,
            
            
                name,
            
            
                short_name,
            
            
                parent_id,
            
            
                phone,
            
            
                city_code,
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
                type,
            
            
                create_time,
            
            
                update_by,
            
            
                update_time,
            
            
            
            
                path,
            
            
            
            
            
            
                oid,
            
            
                parent_guid,
            
            
                deleted,
            
            
                sort,
            
            
                source,
            
            
                remark,
            
            
            
            
                create_by,
            
            
                update_by,
            
        
        
            
                #{address},
            
            
                #{code},
            
            
            
            
                #{guid},
            
            
                #{isLock},
            
            
                #{manager},
            
            
                #{managerPhone},
            
            
                #{name},
            
            
                #{shortName},
            
            
                #{parentId},
            
            
                #{phone},
            
            
                #{cityCode},
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
                #{type},
            
            
                #{createTime},
            
            
                #{updateBy},
            
            
                #{updateTime},
            
            
            
            
                #{path},
            
            
            
            
            
            
            
            
                #{parentGuid},
            
            
                #{deleted},
            
            
                #{sort},
            
            
                #{source},
            
            
                #{remark},
            
            
            
            
                #{createBy},
            
            
                #{updateBy},
            
        
    
    
        update sys_org
        
            
                address =
                #{address},
            
            
                code =
                #{code},
            
            
            
            
            
                guid =
                #{guid},
            
            
                is_lock =
                #{isLock},
            
            
                manager =
                #{manager},
            
            
                manager_phone =
                #{managerPhone},
            
            
                name =
                #{name},
            
            
                short_name =
                #{shortName},
            
            
                parent_id =
                #{parentId},
            
            
                phone =
                #{phone},
            
            
                city_code =
                #{cityCode},
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
                type =
                #{type},
            
            
                create_time =
                #{createTime},
            
            
                update_by =
                #{updateBy},
            
            
                update_time =
                #{updateTime},
            
            
            
            
            
                path =
                #{path},
            
            
            
            
            
            
            
            
            
            
            
                parent_guid =
                #{parentGuid},
            
            
                deleted =
                #{deleted},
            
            
                sort =
                #{sort},
            
            
                source =
                #{source},
            
            
                remark =
                #{remark},
            
            
            
            
            
                create_by =
                #{createBy},
            
            
                update_by =
                #{updateBy},
            
        
        where id = #{id}
    
    
        delete
        from sys_org
        where id = #{id}
    
    
        delete from sys_org where id in
        
            #{id}