Pintuangroup.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * Niushop商城系统 - 团队十年电商经验汇集巨献!
  4. * =========================================================
  5. * Copy right 2019-2029 山西牛酷信息科技有限公司, 保留所有权利。
  6. * ----------------------------------------------
  7. * 官方网址: https://www.niushop.com.cn
  8. * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和使用。
  9. * 任何企业和个人不允许对程序代码以任何形式任何目的再发布。
  10. * =========================================================
  11. */
  12. namespace addon\pintuan\api\controller;
  13. use addon\pintuan\model\PintuanGroup as PintuanGroupModel;
  14. use app\api\controller\BaseApi;
  15. /**
  16. * 拼团组
  17. */
  18. class Pintuangroup extends BaseApi
  19. {
  20. /**
  21. * 列表信息
  22. */
  23. public function lists()
  24. {
  25. $goods_id = isset($this->params['goods_id']) ? $this->params['goods_id'] : 0;
  26. if (empty($goods_id)) {
  27. return $this->response($this->error('', 'REQUEST_GOODS_ID'));
  28. }
  29. $pintuan_group_model = new PintuanGroupModel();
  30. $condition = [
  31. [ 'ppg.goods_id', '=', $goods_id ],
  32. [ 'ppg.status', '=', 2 ],// 当前状态:0未支付 1拼团失败 2.组团中3.拼团成功
  33. ];
  34. $list = $pintuan_group_model->getPintuanGoodsGroupList($condition);
  35. return $this->response($list);
  36. }
  37. }