CronGoodsTimerOff.php 768 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Niushop商城系统 - 团队十年电商经验汇集巨献!
  4. * =========================================================
  5. * Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
  6. * ----------------------------------------------
  7. * 官方网址: https://www.niushop.com
  8. * =========================================================
  9. */
  10. namespace app\event;
  11. use app\model\goods\Goods;
  12. /**
  13. * 定时下架商品
  14. * @author Administrator
  15. *
  16. */
  17. class CronGoodsTimerOff
  18. {
  19. public function handle($param)
  20. {
  21. $goods_model = new Goods();
  22. $condition = [
  23. [ 'goods_id', '=', $param[ 'relate_id' ] ]
  24. ];
  25. $res = $goods_model->cronModifyGoodsState($condition, 0);
  26. return $res;
  27. }
  28. }