某个目录下产品根据创建时间自动下架
某个目录下产品根据创建时间自动下架
1
DELETE FROM catalog_category_product where category_id=7 and product_id in(select entity_id from catalog_product_entity where entity_id in(select t.product_id from (SELECT product_id,category_id from catalog_category_product) t where t.category_id=7) AND to_days(now())-to_days(created_at)>=90)