diff --git a/api/controllers/plan/Syt.php b/api/controllers/plan/Syt.php index 82fde506..ce66ac25 100644 --- a/api/controllers/plan/Syt.php +++ b/api/controllers/plan/Syt.php @@ -346,15 +346,16 @@ class Syt extends CI_Controller !$page && $page = 1; !$size && $size = 20; $where = [ - 'organizationId>' => 0, + 'activityId>' => 0, 'userId>' => 0 ]; $total = $this->act_user_model->count($where); $filed = 'id,userId,activityId'; $rows = $this->act_user_model->select($where,'id asc',$page,$size,$filed); if(!$rows){ - echo "执行完毕"; + echo "执行完毕";exit; } + echo $total.'
'; $user_ids = implode(',',array_column($rows,'userId')); $where = ["userId in ({$user_ids})"=>null]; $users = $this->user_model->map('userId','',$where); @@ -403,7 +404,7 @@ class Syt extends CI_Controller $orderTotal && $update['orderTotal'] = $browse; $watch && $update['watch'] = $browse; $this->act_user_model->update($update,['userId'=>$item['userId']]); - echo "更新成功:".json_encode($update,JSON_UNESCAPED_UNICODE)."
"; + echo "用户id:{$item['userId']}更新成功:".json_encode($update,JSON_UNESCAPED_UNICODE)."
"; } } } diff --git a/home/controllers/h5/market/sylive/Stic.php b/home/controllers/h5/market/sylive/Stic.php index 15210d42..17df275e 100644 --- a/home/controllers/h5/market/sylive/Stic.php +++ b/home/controllers/h5/market/sylive/Stic.php @@ -407,9 +407,9 @@ class Stic extends Admin{ 'type' => 0, ]; if($type==1){ //预热 - $where['c_time<='] = strtotime($row['timeStart']); + $where['createTime<='] = strtotime($row['timeStart']); }else{ //开始 - $where['c_time>='] = strtotime($row['timeStart']); + $where['createTime>='] = strtotime($row['timeStart']); } $total = $this->mdSytActivityKpiData->count($where); $lists = []; diff --git a/home/controllers/h5/market/sylive/Tstic.php b/home/controllers/h5/market/sylive/Tstic.php index 7d7e777b..d92d7832 100644 --- a/home/controllers/h5/market/sylive/Tstic.php +++ b/home/controllers/h5/market/sylive/Tstic.php @@ -308,9 +308,9 @@ class Tstic extends Admin{ 'cfUserId'=>$this->uid ]; if($type==1){ //预热 - $where['c_time<='] = strtotime($row['timeStart']); + $where['createTime<='] = strtotime($row['timeStart']); }else{ //开始 - $where['c_time>='] = strtotime($row['timeStart']); + $where['createTime>='] = strtotime($row['timeStart']); } $total = $this->mdSytActivityKpiData->count($where); $lists = [];