edit-sylive-plan

This commit is contained in:
lccsw
2022-11-03 19:49:02 +08:00
parent f4c2ab9939
commit 6e6970ef97
3 changed files with 8 additions and 7 deletions
+4 -3
View File
@@ -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.'<br>';
$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)."<br>";
echo "用户id:{$item['userId']}更新成功:".json_encode($update,JSON_UNESCAPED_UNICODE)."<br>";
}
}
}
+2 -2
View File
@@ -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 = [];
+2 -2
View File
@@ -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 = [];