shopId; $where['status'] = 1; $list = XjClass::getAllXj(); util::success(['list' => $list]); } //取出商家小菊 shish 20210904 public function actionGetSjXj() { $list = XjClass::getSjXj($this->shopExt); util::success(['list' => $list]); } //取出所有小菊,带商家有没有标识 shish 20210904 public function actionGetFilterXj() { $where = []; $where['shopId'] = $this->shopId; $where['status'] = 1; $list = XjClass::getAllXj(); $ext = $this->shopExt; $xj = $ext->xj ?? ''; $hasIds = []; if (!empty($xj)) { $hasIds = json_decode($xj, true); } if (!empty($list)) { foreach ($list as $key => $val) { $id = $val['id'] ?? 0; $list[$key]['has'] = 0; if (in_array($id, $hasIds)) { $list[$key]['has'] = 1; } } } util::success(['list' => $list]); } }