GoodsListCategoryIds.php 948 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Niushop商城系统 - 团队十年电商经验汇集巨献!
  4. * =========================================================
  5. * Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
  6. * ----------------------------------------------
  7. * 官方网址: https://www.niushop.com
  8. * =========================================================
  9. */
  10. namespace addon\bargain\event;
  11. use addon\bargain\model\Bargain;
  12. /**
  13. * 商品分类
  14. */
  15. class GoodsListCategoryIds
  16. {
  17. public function handle($param)
  18. {
  19. if (empty($param[ 'promotion' ]) || $param[ 'promotion' ] != 'bargain') return [];
  20. $condition = [
  21. [ 'pb.site_id', '=', $param[ 'site_id' ] ],
  22. [ 'pb.status', '=', 1 ],
  23. [ 'g.goods_state', '=', 1 ],
  24. [ 'g.is_delete', '=', 0 ]
  25. ];
  26. $model = new Bargain();
  27. $res = $model->getGoodsCategoryIds($condition);
  28. return $res;
  29. }
  30. }