...
|
...
|
@@ -24,12 +24,11 @@ class TestController extends HomeBaseController |
|
|
* @throws \think\exception\PDOException
|
|
|
*/
|
|
|
public function test(){
|
|
|
$indent_data = Db::query("select id,uid,indent_id,count(indent_id) count from `cmf_money_income` group by indent_id having count(indent_id) >= 4 order by indent_id desc");
|
|
|
$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");
|
|
|
$a = [];
|
|
|
foreach ($indent_data as $v) {
|
|
|
if($v['count'] == 4) {
|
|
|
$money = Db::name('money_income')->where('uid',$v['uid'])->where('money','>',0)->where('indent_id',$v['indent_id'])->count();
|
|
|
if($money) {
|
|
|
if($v['money'] > 0) {
|
|
|
$v['nickname'] = Db::name('user')->where('id',$v['uid'])->value('user_nickname');
|
|
|
$a[] = $v;
|
|
|
}
|
...
|
...
|
|