💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## 订单商品(订单ID) ``` $ordergoods = pdo_fetchall("select og.id,og.total,og.realprice,g.nocommission from " . tablename('ewei_shop_order_goods') . ' og left join ' . tablename('ewei_shop_goods') . ' g on g.id = og.goodsid where og.orderid=:orderid and og.uniacid=:uniacid', array(':orderid' => $orderid, ':uniacid' => $_W['uniacid'])); foreach($ordergoods as $v){ if(empty($v['nocommission'])){ $hasokgoods = true; $goodscount += $v['total']; $commissions = $this->getOrderCommissions($orderid,$v['id']); $commissionl1 += $commissions['level1']; $allprice += $v['realprice']; } } ``` ## 下线人数 ``` //直推人数 $ztcount = pdo_fetchcolumn('select count(id) from ' . tablename('ewei_shop_member') . " where uniacid=:uniacid and agentid=:agentid and status=1 and isagent=1 and agentlevel>=0 limit 1", array(':uniacid' => $_W['uniacid'], ':agentid' => $agentuser['id'])); //下级团队所有ID $allxj = pdo_fetchall('select id from ' . tablename('ewei_shop_commission_relation') . ' where pid=:pid', array(':pid' => $id), 'id') ; //直推等于自己级别的直推 $zjcount = pdo_fetchcolumn('select count(*) from ' . tablename('ewei_shop_commission_relation') . ' a left join ' . tablename('ewei_shop_member') . ' m on m.id = a.id where a.pid=:pid and m.status=1 and m.isagent=1 and m.agentlevel=:levelid limit 1', array(':pid' => $agentuser['id'],':levelid' => $levelid)); ```