frompot_libs.mysql_util.mysql_utilimportMysqlUtilasyncdefchange_sensor_record_by_location_id(location_id):"""根据location_id查询change_sensor_record表"""sql='select sid,field from change_sensor_record where location_id=%s ' \'order by start_time desc limit 1'asyncwithMysqlUtil()asconn:change_sensor_dic=awaitconn.fetchone(sql,args=(location_id,))returnchange_sensor_dic