GoodsListCategoryIds.php 967 B

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