立即注册 登录
81路工程师大巴 - 81Lu.Net 返回首页

lurenj的个人空间 http://www.81lu.net/?810046 [收藏] [复制] [RSS]

博客

甜心100分销系统,三级分佣主要代码

已有 162 次阅读2017-5-9 12:27 |个人分类:PHP|系统分类:综合| 分销系统

模板地址:\m\tpl\*\{name}.php

*.php?act={‘act’}。

{name} = $_GET['act'];


控制器后台地址:

\m\app\user\contoroller.php->dailicenter();

\m\app\daili\contoroller.php->v2_mymoney();

-----------------------------
//未有付款佣金
$sql = "SELECT SUM(tb1.money) FROM `{$this->App->prefix()}user_money_change_cache` AS tb1 LEFT JOIN `{$this->App->prefix()}goods_order_info` AS tb2 ON tb2.order_sn = tb1.order_sn WHERE tb1.uid = '$uid' AND tb2.pay_status='0' AND tb2.order_status!='4' AND tb2.order_status!='1' AND tb1.money > 0 LIMIT 1";
$rt['pay1'] = $this->App->findvar($sql);

//已经付款佣金
$sql = "SELECT SUM(tb1.money) FROM `{$this->App->prefix()}user_money_change` AS tb1 LEFT JOIN `{$this->App->prefix()}goods_order_info` AS tb2 ON tb2.order_sn = tb1.order_sn WHERE tb1.uid = '$uid' AND tb2.pay_status='1' AND tb1.money > 0 LIMIT 1";
$rt['pay2'] = $this->App->findvar($sql);

//已经收货订单佣金
$sql = "SELECT SUM(tb1.money) FROM `{$this->App->prefix()}user_money_change` AS tb1 LEFT JOIN `{$this->App->prefix()}goods_order_info` AS tb2 ON tb2.order_sn = tb1.order_sn WHERE tb1.uid = '$uid' AND tb2.shipping_status='5' AND tb1.money > 0 LIMIT 1";
$rt['pay3'] = $this->App->findvar($sql);

//已经取消作废佣金
$sql = "SELECT SUM(tb1.money) FROM `{$this->App->prefix()}user_money_change_cache` AS tb1 LEFT JOIN `{$this->App->prefix()}goods_order_info` AS tb2 ON tb2.order_sn = tb1.order_sn WHERE tb1.uid = '$uid' AND (tb2.order_status='1' OR tb2.pay_status='2') AND tb1.money > 0 LIMIT 1";
$rt['pay4'] = $this->App->findvar($sql);

//审核通过的佣金
$sql = "SELECT SUM(tb1.money) FROM `{$this->App->prefix()}user_money_change` AS tb1 LEFT JOIN `{$this->App->prefix()}goods_order_info` AS tb2 ON tb2.order_sn = tb1.order_sn WHERE tb1.uid = '$uid' AND tb2.shipping_status='5' AND tb2.pay_status='1' AND tb1.money > 0 LIMIT 1";

$rt['pay5'] = $this->App->findvar($sql);


路过

鸡蛋

鲜花

握手

雷人

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 立即注册

手机版|小黑屋|81路工程师大巴 - 81Lu.Net ( 豫ICP备15009715号 )

GMT+8, 2017-11-21 16:03

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

返回顶部