|
@@ -58,15 +58,6 @@ class UserInfo extends BaseController
|
|
|
->alias("a")
|
|
|
->leftJoin("user b", "a.id=b.account_id and b.status=1")
|
|
|
->append(['plat', 'company_relaton'])
|
|
|
-// ->withAttr('plat', function ($val, $da) {
|
|
|
-// return Db::name("account_plat")
|
|
|
-// ->alias("a")
|
|
|
-// ->leftJoin("platform b", "a.plat_code=b.plat_code and b.is_del=0 and b.status=1")
|
|
|
-// ->where(["a.status" => 1, "a.is_del" => 0, "a.account_id" => $da['id']])
|
|
|
-// ->field("a.plat_code,plat_name")
|
|
|
-// ->select()
|
|
|
-// ->toArray();
|
|
|
-// })
|
|
|
->withAttr('company_relaton', function ($val, $da) {
|
|
|
return Db::name("account_company")
|
|
|
->where(["account_id" => $da['id'], "is_del" => 0])
|
|
@@ -336,11 +327,9 @@ class UserInfo extends BaseController
|
|
|
$count = Db::name("account")
|
|
|
->alias("a")
|
|
|
->leftJoin("user b", "a.id=b.account_id and b.status=1")
|
|
|
- ->leftJoin("account_company c", "a.id=c.account_id and c.status=1 and c.is_del=0")
|
|
|
+ ->leftJoin("account_company c", "a.id=c.account_id and c.is_del=0")
|
|
|
->where($condition)
|
|
|
-// ->whereOr($whereor)
|
|
|
->count();
|
|
|
-
|
|
|
$total = intval(ceil($count / $size));
|
|
|
$page = $total >= $page ? $page : $total;
|
|
|
$list = Db::name("account")
|
|
@@ -352,15 +341,6 @@ class UserInfo extends BaseController
|
|
|
// ->whereOr($whereor)
|
|
|
->page($page, $size)
|
|
|
->append(['plat', 'company_relaton'])
|
|
|
-// ->withAttr('plat', function ($val, $da) {
|
|
|
-// return Db::name("account_plat")
|
|
|
-// ->alias("a")
|
|
|
-// ->leftJoin("platform b", "a.plat_code=b.plat_code and b.is_del=0 and b.status=1")
|
|
|
-// ->where(["a.status" => 1, "a.is_del" => 0, "a.account_id" => $da['id']])
|
|
|
-// ->field("a.plat_code,plat_name")
|
|
|
-// ->select()
|
|
|
-// ->toArray();
|
|
|
-// })
|
|
|
->withAttr('company_relaton', function ($val, $da) {
|
|
|
return Db::name("account_company")
|
|
|
->where(["account_id" => $da['id'], "is_del" => 0])
|