SELECT de.device_id,app_name,user_name,sn,de.device_id IN (select device_id from device_black) AS blackFlag FROM device AS de
SELECT de.device_id,app_name,user_name,sn,de.create_time,de.update_time,de.device_id IN (select device_id from device_black) AS blackFlag FROM device AS de