1.名下店铺不显示问题

This commit is contained in:
xucong 2024-10-15 18:27:04 +08:00
parent 73b4c1d3a9
commit d40742b73c

@ -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)