|
@@ -70,6 +70,9 @@ class Member extends BaseController
|
|
|
$data = (new UserModel)
|
|
|
->field("u.uid,u.nickname,u.name,u.regtime,u.score,u.money,u.status,u.avatar,u.mobile,u.parent_uid"
|
|
|
. ",p.nickname as p_nickname,p.mobile as p_mobile"
|
|
|
+ . ",(select count(*) from table_user_show_template where uid = u.uid) as showTempCount"
|
|
|
+ . ",(select count(*) from table_info_audit where uid = u.uid and status = 1) as is_info_audit"
|
|
|
+ . ",(select count(*) from table_type_audit where uid = u.uid and status = 1) as is_type_audit"
|
|
|
. ",(select count(*) from table_user where parent_uid = u.uid) as branchCount")
|
|
|
->alias("u")
|
|
|
->leftJoin("user p","p.uid = u.parent_uid")
|
|
@@ -81,9 +84,10 @@ class Member extends BaseController
|
|
|
$pageCount = (new UserModel)->alias("u")->where($where)->count();
|
|
|
$data = empty($data)?[]:$data;
|
|
|
foreach($data as $k=>$v){
|
|
|
- $data[$k]["regtime"] = date("Y-m-d H:i:s",$v["regtime"]);
|
|
|
- $data[$k]["mobile"] = empty($v["mobile"])?"未绑定":$v["mobile"];
|
|
|
- $data[$k]["p_mobile"] = empty($v["mobile"])?"未绑定":$v["p_mobile"];
|
|
|
+ $data[$k]["regtime"] = date("Y-m-d H:i:s",$v["regtime"]);
|
|
|
+ $data[$k]["mobile"] = empty($v["mobile"]) ?"未绑定":$v["mobile"];
|
|
|
+ $data[$k]["p_mobile"] = empty($v["p_mobile"])?"未绑定":$v["p_mobile"];
|
|
|
+
|
|
|
}
|
|
|
return app('json')->success([
|
|
|
'list' => $data,
|