select * from t_class_info where date_format(now(),'%Y-%m-%d-%H-%i-%S')>=begin_date and date_format(now(),'%Y-%m-%d-%H-%i-%S')<=date_format(end_date,'%Y-%m-%d-24-00-00')
关键是这句:
date_format(now(),'%Y-%m-%d-%H-%i-%S')<=date_format(end_date,'%Y-%m-%d-24-00-00')