From d40742b73c06b6cd3dcacac06263f20b2d946b92 Mon Sep 17 00:00:00 2001 From: xucong <850806214@qq.com> Date: Tue, 15 Oct 2024 18:27:04 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=90=8D=E4=B8=8B=E5=BA=97=E9=93=BA=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/User.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/app/api/controller/User.php b/app/api/controller/User.php index 89329786..844b7a19 100755 --- a/app/api/controller/User.php +++ b/app/api/controller/User.php @@ -303,9 +303,9 @@ class User extends Api $p = $pa*$size; //查询条件 if($type == 1){ - $sql = "SELECT * FROM ls_user a,ls_shop_apply b WHERE a.id = b.user_id and - a.first_leader = $user_id and a.disable = 0 and a.del = 0 and b.del=0 - and b.audit_status = 2 limit ".$p.",".$size; + $sql = "SELECT * FROM ls_user a,ls_shop b WHERE a.id = b.reference_user_id and + a.id = $user_id and a.disable = 0 and a.del = 0 and b.del=0 + limit ".$p.",".$size; // var_dump($sql); $lists = Db::query($sql); // $sql = "SELECT count(*) as cont FROM ls_user a,ls_shop_apply b WHERE a.id = b.user_id and @@ -314,18 +314,17 @@ class User extends Api $count = $qy_count = Db::name("shop_apply") ->alias("a") ->join("user b","a.user_id = b.id","left") - ->where("b.first_leader",$user_id) + ->where("b.id",$user_id) ->where("b.disable",0) ->where("b.del",0) ->where("a.del",0) - ->where("a.audit_status",2) ->count(); // $count = Db::query($sql); // $count = $count[0]['cont']; $local_count = Db::name("local_store") ->alias("a") ->join("user b","a.user_id = b.id","left") - ->where("b.first_leader",$user_id) + ->where("b.id",$user_id) ->where("b.disable",0) ->where("b.del",0) ->where("a.is_delete",0) @@ -333,7 +332,7 @@ class User extends Api ->count(); }else{ $sql = "SELECT * FROM ls_user a,ls_local_store b WHERE a.id = b.user_id and - a.first_leader = $user_id and a.disable = 0 and a.del = 0 and b.is_delete=0 + a.id = $user_id and a.disable = 0 and a.del = 0 and b.is_delete=0 and b.store_state = 1 limit ".$p.",".$size; $lists = Db::query($sql); // $sql = "SELECT count(*) as cont FROM ls_user a,ls_local_store b WHERE a.id = b.user_id and @@ -344,7 +343,7 @@ class User extends Api $count = $local_count = Db::name("local_store") ->alias("a") ->join("user b","a.user_id = b.id","left") - ->where("b.first_leader",$user_id) + ->where("b.id",$user_id) ->where("b.disable",0) ->where("b.del",0) ->where("a.is_delete",0) @@ -353,7 +352,7 @@ class User extends Api $qy_count = Db::name("shop_apply") ->alias("a") ->join("user b","a.user_id = b.id","left") - ->where("b.first_leader",$user_id) + ->where("b.id",$user_id) ->where("b.disable",0) ->where("b.del",0) ->where("a.del",0)