SELECT
        cast( t1.`class_id` AS CHAR ( 36 ) charset utf8 ) AS `class_id`,
        t1.`id_int` AS `id_int`,
        t1.`bh` AS `bh`,
        t1.`class_code` AS `class_code`,
        t1.`class_name` AS `class_name`,
        t1.`class_alias` AS `class_alias`,
        t1.`rxnf` AS `rxnf`,
        t1.`rxjj` AS `rxjj`,
        t1.`schooling_length` AS `schooling_length`,
        t1.`stage_id` AS `stage_id`,
        cast( t1.`teacher_id` AS CHAR ( 36 ) charset utf8 ) AS `teacher_id`,
        cast( t1.`org_id` AS CHAR ( 36 ) charset utf8 ) AS `org_id`,
        cast( t1.`bureau_id` AS CHAR ( 36 ) charset utf8 ) AS `bureau_id`,
        cast( t1.`b_use` AS signed ) AS `b_use`,
        t1.`province_code` AS `province_code`,
        t1.`city_code` AS `city_code`,
        t1.`district_code` AS `district_code`,
        cast( t1.`main_school_id` AS CHAR ( 36 ) charset utf8 ) AS `main_school_id`,
        DATE_FORMAT(t1.`create_time`,'%Y/%m/%d %H:%i:%s') AS `create_time`,
        t1.`last_updated_time` AS `last_updated_time`,
        `t_dm_stage`.`stage_name` AS `stage_name`,
        `t_base_organization`.`org_name` AS `org_name` ,
        case t1.`b_use` when -1 then 1 else 0 end AS `del_flag`
        FROM
        ((t_base_class as t1    JOIN `t_dm_stage` ON ( t1.`stage_id` = `t_dm_stage`.`stage_id` ))
        JOIN `t_base_organization` ON ( t1.`bureau_id` = `t_base_organization`.`org_id` ))
        