正在显示
1 个修改的文件
包含
7 行增加
和
7 行删除
@@ -27,13 +27,13 @@ class TestController extends HomeBaseController | @@ -27,13 +27,13 @@ class TestController extends HomeBaseController | ||
27 | $indent_data = Db::query("select id,uid,money,indent_id,count(indent_id) count from `cmf_money_income` group by indent_id having count(indent_id) >= 4 order by indent_id desc"); | 27 | $indent_data = Db::query("select id,uid,money,indent_id,count(indent_id) count from `cmf_money_income` group by indent_id having count(indent_id) >= 4 order by indent_id desc"); |
28 | $a = []; | 28 | $a = []; |
29 | foreach ($indent_data as $v) { | 29 | foreach ($indent_data as $v) { |
30 | - $a[] = $v; | ||
31 | -// if($v['count'] == 4) { | ||
32 | -// if($v['money'] > 0) { | ||
33 | -// $v['nickname'] = Db::name('user')->where('id',$v['uid'])->value('user_nickname'); | ||
34 | -// $a[] = $v; | ||
35 | -// } | ||
36 | -// } | 30 | + if($v['count'] == 4) { |
31 | + $data = Db::name('money_income')->where('money','>',0)->where('indent_id',$v['indent_id'])->find(); | ||
32 | + if($data) { | ||
33 | + $data['nickname'] = Db::name('user')->where('id',$v['uid'])->value('user_nickname'); | ||
34 | + $a[] = $data; | ||
35 | + } | ||
36 | + } | ||
37 | } | 37 | } |
38 | print_r($a);exit; | 38 | print_r($a);exit; |
39 | // $data = Db::name('my_user')->where(['status'=>3,'inviter_phone'=>['neq','']])->select()->toArray(); | 39 | // $data = Db::name('my_user')->where(['status'=>3,'inviter_phone'=>['neq','']])->select()->toArray(); |
-
请 注册 或 登录 后发表评论