DROP EVENT IF EXISTS `event_cuxiaogoods`;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` EVENT `event_cuxiaogoods` ON SCHEDULE EVERY 1 MINUTE STARTS '2016-01-17 14:49:43' ON COMPLETION NOT PRESERVE ENABLE DO 

BEGIN
   update yc_goods set isSale =0  where goodsId in   (select goodsId from(select goodsId from yc_goods   where  datediff(now(),date_add(fabutime, interval huodongtime day))=0 ) a);

END
;;
DELIMITER ;

 

posted on 2018-10-10 18:34  巴黎夜雨……  阅读(962)  评论(0编辑  收藏  举报