Explorar o código

用户详情增加返回总收益

sunxbiao hai 1 ano
pai
achega
a7304f0b8b
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      app/controller/admin/user/User.php

+ 5 - 0
app/controller/admin/user/User.php

@@ -996,6 +996,11 @@ class User extends BaseController
996
         $where=["uid"=>$id,"type"=>"commission","commission_type"=>5];
996
         $where=["uid"=>$id,"type"=>"commission","commission_type"=>5];
997
         $ylj=Db::name("user_bill")->where($where)->whereIn('status',[0,1])->sum('number');
997
         $ylj=Db::name("user_bill")->where($where)->whereIn('status',[0,1])->sum('number');
998
         $data['ylj']=$ylj?$ylj:0;
998
         $data['ylj']=$ylj?$ylj:0;
999
+        $revenue = Db::name("user_bill")
1000
+            ->where(["uid" => $id, "type" => "commission"])
1001
+            ->whereIn('status', [0, 1])
1002
+            ->sum('number');
1003
+        $data['revenue']=$revenue?$revenue:0;
999
         return app('json')->success($data);
1004
         return app('json')->success($data);
1000
     }
1005
     }
1001
 
1006