update orders set is_remind=1 where order_taking_user_id = #{userId} update orders set state=3 where state = 0 and date_format(date_add(create_time, interval #{time} minute), '%Y-%m-%d %H:%i:%S') <= date_format(now(), '%Y-%m-%d %H:%i:%S')