Merge branch 'dev' of 47.111.118.107:/srv/git/platform into dev

master
tpingzhang 5 years ago
commit e8f6e310d1

@ -219,9 +219,11 @@ class MemberController extends ThinkController
->group('tab_user.id') ->group('tab_user.id')
->where($hav) ->where($hav)
->having($havs)->select(false); ->having($havs)->select(false);
$allcountsql = str_replace("tab_user.promote_id","ss.promote_id",$sql);
//获取总额 //获取总额
$allcount = M()->field('count(a.id) as count,sum(a.recharge_total) recharge_total')->table('(' . $sql . ') as a')->select(); $allcount = M()->field('count(a.id) as count,sum(a.recharge_total) recharge_total')->table('(' . $allcountsql . ') as a')->select();
$this->assign('history_count', $allcount[0]['recharge_total']); $this->assign('history_count', $allcount[0]['recharge_total']?:0);
//替换为新表 //替换为新表
if($_REQUEST['promote_id'] && $_REQUEST['promote_id'] > -1){ if($_REQUEST['promote_id'] && $_REQUEST['promote_id'] > -1){
@ -236,9 +238,10 @@ class MemberController extends ThinkController
} }
$jcount = M('User', 'tab_')->field('count(a.id) as count,sum(a.recharge_total) recharge_total')->table('(' . $sql . ') as a')->select(); $jcount = M('User', 'tab_')->field('count(a.id) as count,sum(a.recharge_total) recharge_total')->table('(' . $sql . ') as a')->select();
$count = $jcount[0]['count']; $count = $jcount[0]['count'] ?:0 ;
$this->assign('user_count', $count);
// var_dump($jcount);die(); // var_dump($jcount);die();
$this->assign('now_count', $jcount[0]['recharge_total']); $this->assign('now_count', $jcount[0]['recharge_total']?:0);
$model = M('Model')->getByName('user'); $model = M('Model')->getByName('user');

@ -310,7 +310,8 @@
<if condition="I('promote_id') && I('promote_id') gt 0 "> <if condition="I('promote_id') && I('promote_id') gt 0 ">
<td colspan="8"> <td colspan="8">
当前用户累计充值:{$now_count} &#12288;&#12288; 当前用户累计充值:{$now_count} &#12288;&#12288;
历史累计充值:{$history_count} 历史累计充值:{$history_count}&#12288;&#12288;
用户数:{$user_count}
</td> </td>
<td colspan="8" style="font-style: 12px;color: #a9a9a9;text-align: center;"> <td colspan="8" style="font-style: 12px;color: #a9a9a9;text-align: center;">
当前用户累计充值:&#12288;当前属于该推广员的用户的充值累计(不含用户换绑前记录)&#12288;&#12288;/&#12288;&#12288; 当前用户累计充值:&#12288;当前属于该推广员的用户的充值累计(不含用户换绑前记录)&#12288;&#12288;/&#12288;&#12288;
@ -318,7 +319,7 @@
</td> </td>
<else /> <else />
<td colspan="99"> <td colspan="99">
当前用户累计充值:{$now_count} 当前用户累计充值:{$now_count}&#12288;&#12288;用户数:{$user_count}
</td> </td>
</if> </if>

Loading…
Cancel
Save