GoodsListCategoryIds.php 874 B

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