|
|
@ -2358,6 +2358,7 @@ public function iosDetailExcelInfo($id,$map) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$rs = M('promote', 'tab_')->field(['id'])->where($map1)->select();
|
|
|
|
$rs = M('promote', 'tab_')->field(['id'])->where($map1)->select();
|
|
|
|
$allids = array_column($rs, 'id');
|
|
|
|
$allids = array_column($rs, 'id');
|
|
|
|
|
|
|
|
array_push($allids, PID);
|
|
|
|
$allUserMap['promote_id'] = ['in', $allids];
|
|
|
|
$allUserMap['promote_id'] = ['in', $allids];
|
|
|
|
$allTFMap['promote_id'] = ['in', $allids];
|
|
|
|
$allTFMap['promote_id'] = ['in', $allids];
|
|
|
|
$allTFMap['type'] = 2;
|
|
|
|
$allTFMap['type'] = 2;
|
|
|
@ -2386,12 +2387,20 @@ public function iosDetailExcelInfo($id,$map) {
|
|
|
|
$data = M('promote', 'tab_')->field(['id'])->where($map1)
|
|
|
|
$data = M('promote', 'tab_')->field(['id'])->where($map1)
|
|
|
|
->limit(($i-1)*$perSize ,$perSize)->select();
|
|
|
|
->limit(($i-1)*$perSize ,$perSize)->select();
|
|
|
|
$ids = array_column($data, 'id');
|
|
|
|
$ids = array_column($data, 'id');
|
|
|
|
|
|
|
|
if ($i == 1) {
|
|
|
|
|
|
|
|
array_unshift($ids, PID);
|
|
|
|
|
|
|
|
}
|
|
|
|
foreach($ids as $key => $id) {
|
|
|
|
foreach($ids as $key => $id) {
|
|
|
|
$promote1 = M('promote', 'tab_')->field('account, level, parent_id, chain')->where(['id' => $id])->select();
|
|
|
|
$promote1 = M('promote', 'tab_')->field('account, level, parent_id, chain')->where(['id' => $id])->select();
|
|
|
|
$promote = $promote1[0];
|
|
|
|
$promote = $promote1[0];
|
|
|
|
$chain = $promote['chain'];
|
|
|
|
$chain = $promote['chain'];
|
|
|
|
//$csvData['promote_id'] = $id;
|
|
|
|
//$csvData['promote_id'] = $id;
|
|
|
|
$csvData['account'] = $promote['account'];
|
|
|
|
if($id == PID) {
|
|
|
|
|
|
|
|
$csvData['account'] = $promote['account'].'[自己]';
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
$csvData['account'] = $promote['account'];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$tfMap['promote_id'] = $id;
|
|
|
|
$tfMap['promote_id'] = $id;
|
|
|
|
$tfMap['type'] = 2;
|
|
|
|
$tfMap['type'] = 2;
|
|
|
|
$companyMap['promote_id'] = $id;
|
|
|
|
$companyMap['promote_id'] = $id;
|
|
|
|