-- 每天更新连续异常天数 UPDATE sc_water_meter_error_days set days = 0,start_date = null,end_date = null WHERE end_date < DATE_FORMAT(date_add(:date, interval -1 day), '%Y%m%d' ) and status = 1