|
|
@ -874,8 +874,19 @@ class PromoteController extends BaseController
|
|
|
|
if (count($ids) > 0) {
|
|
|
|
if (count($ids) > 0) {
|
|
|
|
$countList = M('promote', 'tab_')->field(['count(*)' => 'count', 'parent_id' => 'parent_id'])->where(['parent_id' => ['in', $ids]])->group('parent_id')->select();
|
|
|
|
$countList = M('promote', 'tab_')->field(['count(*)' => 'count', 'parent_id' => 'parent_id'])->where(['parent_id' => ['in', $ids]])->group('parent_id')->select();
|
|
|
|
$playerList = M('user_play', 'tab_')->field(['count(*)' => 'count', 'promote_id' => 'promote_id'])->where(['promote_id' => ['in', $ids]])->group('promote_id')->select();
|
|
|
|
$playerList = M('user_play', 'tab_')->field(['count(*)' => 'count', 'promote_id' => 'promote_id'])->where(['promote_id' => ['in', $ids]])->group('promote_id')->select();
|
|
|
|
$shiftList = M('shift_task', 'sys_')->field(['count(*)' => 'count', 'from_promote_id' => 'from_promote_id'])->where(['status' => 0, 'type' => 1, 'from_promote_id' => ['in', $ids]])->group('from_promote_id')->select();
|
|
|
|
|
|
|
|
$shiftPlayerList = M('shift_task', 'sys_')->field(['count(*)' => 'count', 'from_promote_id' => 'from_promote_id'])->where(['status' => 0, 'type' => 2, 'from_promote_id' => ['in', $ids]])->group('from_promote_id')->select();
|
|
|
|
$shiftList = M('shift_task', 'sys_')
|
|
|
|
|
|
|
|
->field(['count(*)' => 'count', 'from_promote_id' => 'from_promote_id'])
|
|
|
|
|
|
|
|
->where(['status' => 0, 'type' => 1, 'from_promote_id' => ['in', $ids]])
|
|
|
|
|
|
|
|
->group('from_promote_id')
|
|
|
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$shiftPlayerList = M('shift_task', 'sys_')
|
|
|
|
|
|
|
|
->field(['count(*)' => 'count', 'from_promote_id' => 'from_promote_id'])
|
|
|
|
|
|
|
|
->where(['status' => 0, 'type' => 2, 'from_promote_id' => ['in', $ids]])
|
|
|
|
|
|
|
|
->group('from_promote_id')
|
|
|
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
|
|
|
|
$hasChildList = array_column($countList, 'parent_id');
|
|
|
|
$hasChildList = array_column($countList, 'parent_id');
|
|
|
|
$hasPlayerList = array_column($playerList, 'promote_id');
|
|
|
|
$hasPlayerList = array_column($playerList, 'promote_id');
|
|
|
|
$hasShiftList = array_column($shiftList, 'from_promote_id');
|
|
|
|
$hasShiftList = array_column($shiftList, 'from_promote_id');
|
|
|
|