market_groups_delete
This commit is contained in:
@@ -215,11 +215,10 @@ class Organization extends BaseController
|
||||
* Notes:机构详情
|
||||
* Created on: 2022/12/09 10:37
|
||||
* Created by: dengbw
|
||||
* @param null $organizationId
|
||||
*/
|
||||
public function info_get($organizationId = null)
|
||||
public function info_get()
|
||||
{
|
||||
$organizationId = intval($organizationId);
|
||||
$organizationId = intval($this->input_param('organizationId'));
|
||||
if (!$organizationId) {
|
||||
$this->return_json('参数错误');
|
||||
}
|
||||
|
||||
@@ -194,11 +194,10 @@ class Groups extends BaseController
|
||||
* Notes:删除分组
|
||||
* Created on: 2022/9/19 11:08
|
||||
* Created by: dengbw
|
||||
* @param null $groupsId
|
||||
*/
|
||||
public function index_delete($groupsId = null)
|
||||
public function index_delete()
|
||||
{
|
||||
$groupsId = intval($groupsId);
|
||||
$groupsId = intval($this->input_param('id'));
|
||||
if (!$groupsId) {
|
||||
$this->return_json('参数错误');
|
||||
}
|
||||
|
||||
@@ -29,9 +29,9 @@ class GroupsStatistics extends BaseController
|
||||
* Created on: 2022/12/05 14:48
|
||||
* Created by: dengbw
|
||||
*/
|
||||
public function index_get($activityId = null)
|
||||
public function index_get()
|
||||
{
|
||||
$activityId = intval($activityId);
|
||||
$activityId = intval($this->input_param('activityId'));
|
||||
if (!$activityId) {
|
||||
$this->return_json('参数错误');
|
||||
}
|
||||
@@ -47,17 +47,20 @@ class GroupsStatistics extends BaseController
|
||||
foreach ($res_item as $k => $v) {
|
||||
$goods[] = ['name' => $v['title'], 'value' => intval($v['itemId'])];
|
||||
}
|
||||
if ($re['activityStart'] != '0000-00-00 00:00:00' && $re['timeEnd'] != '0000-00-00 00:00:00') {
|
||||
$activityStart = date("Y-m-d", strtotime($re['activityStart']));
|
||||
$times = 0;
|
||||
while ($times >= 0) {
|
||||
$day = date("Y-m-d", strtotime("$activityStart +{$times} day"));
|
||||
if ($day <= $re['timeEnd'] & $times <= 15) {
|
||||
$days[] = ['name' => $day, 'value' => $day];
|
||||
$times++;
|
||||
} else {
|
||||
$times = -1;
|
||||
}
|
||||
$activityStart = strtotime($re['activityStart']) > 0 ? strtotime($re['activityStart']) : strtotime($re['timeStart']) - 7 * 24 * 60 * 60;
|
||||
$end_time = time() < strtotime($re['timeEnd']) ? time() : strtotime($re['timeEnd']);
|
||||
$diff_seconds = $end_time - $activityStart;
|
||||
$diff_days = ceil($diff_seconds / 86400);
|
||||
$timeEnd = strtotime($re['timeEnd']);//直播结束往前七天
|
||||
for ($i = 0; $i < $diff_days; $i++) {
|
||||
if (time() < strtotime($re['timeEnd'])) {
|
||||
$day = date('Y-m-d', time() - $i * 24 * 60 * 60);
|
||||
} else {
|
||||
$day = date('Y-m-d', $timeEnd - $i * 24 * 60 * 60);
|
||||
}
|
||||
$days[] = ['name' => $day, 'value' => $day];
|
||||
if ($i == 14) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
$title = $re['title'];
|
||||
|
||||
@@ -112,11 +112,10 @@ class GroupsUser extends BaseController
|
||||
* Notes:同步原始门店用户
|
||||
* Created on: 2022/12/9 12:21
|
||||
* Created by: dengbw
|
||||
* @param null $groupsId
|
||||
*/
|
||||
public function synchronous_get($groupsId = null)
|
||||
public function synchronous_get()
|
||||
{
|
||||
$groupsId = intval($groupsId);
|
||||
$groupsId = intval($this->input_param('groupsId'));
|
||||
if (!$groupsId) {
|
||||
$this->return_json('参数错误');
|
||||
}
|
||||
@@ -232,6 +231,24 @@ class GroupsUser extends BaseController
|
||||
$this->return_response();
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes:删除用户
|
||||
* Created on: 2022/10/21 17:11
|
||||
* Created by: dengbw
|
||||
*/
|
||||
public function batch_delete()
|
||||
{
|
||||
$ids = $this->input_param('ids');
|
||||
if (!$ids) {
|
||||
$this->return_json('参数错误');
|
||||
}
|
||||
$str_ids = implode(',', $ids);
|
||||
if ($str_ids) {
|
||||
$this->mdSyliveGroupsUser->update(['status' => -1], ["groupsUserId in($str_ids)" => null]);
|
||||
}
|
||||
$this->return_response();
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes:栓验字段
|
||||
* Created on: 2022/9/21 15:52
|
||||
|
||||
Reference in New Issue
Block a user