From 11c226ce887993125a4d09bbbf9204f92544201f Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Tue, 22 Nov 2022 10:21:42 +0800 Subject: [PATCH] edit-sylive-auth --- home/controllers/h5/market/sylive/Biz.php | 10 +++++----- home/controllers/h5/market/sylive/Common.php | 1 + home/controllers/h5/market/sylive/Stic.php | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/home/controllers/h5/market/sylive/Biz.php b/home/controllers/h5/market/sylive/Biz.php index 7f1eed01..81261031 100644 --- a/home/controllers/h5/market/sylive/Biz.php +++ b/home/controllers/h5/market/sylive/Biz.php @@ -247,19 +247,19 @@ class Biz extends Admin { ]; if($this->group_id==3){ //顾问 $where["activityId in (select activityId from lc_market_sylive_activity_biz where - bizId in (select parentId from lc_market_sylive_organization where organizationId={$this->session['org_id']} and status=0) + bizId in (select parentId from lc_market_sylive_organization where organizationId={$this->session['org_id']} and status=0) and status=0 )"] = null; }elseif($this->group_id==2){ //当前店铺 - $where["activityId in (select activityId from lc_market_sylive_activity_biz where bizId={$this->session['org_id']})"] = null; + $where["activityId in (select activityId from lc_market_sylive_activity_biz where bizId={$this->session['org_id']}) and status=0"] = null; }elseif($this->group_id==1) { //所有店铺 - $where["activityId in (select activityId from lc_market_sylive_activity_biz where areaId={$this->session['org_id']})"] = null; + $where["activityId in (select activityId from lc_market_sylive_activity_biz where areaId={$this->session['org_id']} and status=0)"] = null; }elseif(!$this->group_id && $biz_id){ - $where["activityId in (select activityId from lc_market_sylive_activity_biz where bizId={$biz_id})"] = null; + $where["activityId in (select activityId from lc_market_sylive_activity_biz where bizId={$biz_id} and status=0)"] = null; }elseif (!$this->group_id && $area_id) { $where["activityId in (select activityId from lc_market_sylive_activity_biz where areaId={$area_id} and status=0)"] = null; }else{ //所有大区 $where["activityId in (select activityId from lc_market_sylive_activity_biz where - areaId in (select organizationId from lc_market_sylive_organization where parentId={$this->session['org_id']} and status=0) + areaId in (select organizationId from lc_market_sylive_organization where parentId={$this->session['org_id']} and status=0) and status=0 )"] = null; } $total = $this->market_sylive_activity_model->count($where); diff --git a/home/controllers/h5/market/sylive/Common.php b/home/controllers/h5/market/sylive/Common.php index 1345a01b..ebf20300 100644 --- a/home/controllers/h5/market/sylive/Common.php +++ b/home/controllers/h5/market/sylive/Common.php @@ -234,6 +234,7 @@ class Wx extends Common{ } }else{ $this->uid = $row_wechat['userId']; + $this->user_model->update(['headimg'=>strval($ret['headimgurl'])],['userId'=>$this->uid]); } $skey = $this->input->get('skey'); $param = $this->myencryption->base64url_decode($skey); diff --git a/home/controllers/h5/market/sylive/Stic.php b/home/controllers/h5/market/sylive/Stic.php index 2fb064df..ac902cb7 100644 --- a/home/controllers/h5/market/sylive/Stic.php +++ b/home/controllers/h5/market/sylive/Stic.php @@ -431,7 +431,7 @@ class Stic extends Admin{ $groupby = 'cfUserId'; $teamId = $this->uid; $select = 'bizId as teamId2,cfUserId,count(id) as t'; - $order = 't desc'; + $order = 't desc,id desc'; $data = $this->sylive_data_entity->top_kpidata($groupby,$where,$order,$page,$size,$select,$teamId); }else{ $biz_id = $this->sylive_entity->get_biz_id($this->session['org_id'],$this->group_id);