多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
数据库表名称 - ims_ewei_shop_member A 用户会员表,包含会员信息 和表ims_mc_members B通过A.uid=B.id来关联 - 在商品订单表ewei_shop_order中 merchid=0为自营商户,此字段意思是是商户id - SELECT * FROM ims_ewei_shop_member where isagent = 1 and `status` = 1;找出所有米掌柜 SELECT count(*) as dami_count from ims_ewei_shop_member where agentid = 581 找出米掌柜一级用户 SELECT * from ims_ewei_shop_member where agentid in(SELECT id from ims_ewei_shop_member where agentid = 581) 找出米掌柜二级用户 select * from ims_ewei_shop_commission_apply where uniacid=5 and id=17 提现订单 在商品表ims_ewei_shop_goods中,货号(商品编号)是唯一的goodssn isnew 是否新上 ishot 是否热卖 isdiscount 是否促销 isrecommand 是否推荐 status 1上架 0下架 deleted 是否删除 1是 0否 查询某个商户所有商品 select * from ims_ewei_shop_goods where status=1 and deleted=0 and uniacid=5 and merchid=81 在ims_ewei_shop_order表中 ismr 是否流量充值 0否 deleted 是否删除 0否 agentid 上级id 上级id=0是总店推荐 isvirtual 是否虚拟物品 isparent 是否父订单0否 一般查询都需要=0 parentid 父订单id 虚拟物品条件 o.ismr=0 and o.deleted=0 and o.isparent=0 and o.agentid>0 and isvirtual=1 ewei_shop_commission_apply 服务费提现申请表 佣金和佣金提现状态 在订单明细表中 status1表示一级状态 申请状态,-2删除,-1无效,0未申请,1申请,2审核通过 3已打款 commission1是佣金 //获取成为分销商商品id 服务费修改方法 先到ewei_shop_member表找到一个用户,查看openid和agentid 将agentid改成自己的,然后去订单表找到openid是这个的订单,并将agentid改成自己的即可 米额度判断 $credits = m('member')->getCredit($openid, 'credit2'); if ($credits < $order['goodriceprice']) { if ($_W['ispost']) { show_json(0, '米额不足,请充值1'); } else { message('米额不足,请充值', mobileUrl('goods',array('cate'=>28)), 'success'); // 线上购买地址 } }