ios 统计

master
sunke 5 years ago
parent 93a6e94075
commit 8114e691d2

@ -2426,12 +2426,19 @@ 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 (in_array($map['localId'], $ids)) {
}else {
}
if ($i == 1) { if ($i == 1) {
if (!empty($map['localId'])) { if (!empty($map['localId']) && !in_array($map['localId'], $ids)) {
array_unshift($ids,$map['localId'] ); array_unshift($ids,$map['localId'] );
} }
if (!in_array(PID, $ids)) {
array_unshift($ids, PID);
}
array_unshift($ids, PID);
} }
foreach($ids as $key => $id) { foreach($ids as $key => $id) {

@ -2527,10 +2527,10 @@ class QueryController extends BaseController
$query = M('promote', 'tab_')->field(['id'])->where($map); $query = M('promote', 'tab_')->field(['id'])->where($map);
list($promotes, $pagination, $count) = $this->paginate($query); list($promotes, $pagination, $count) = $this->paginate($query);
$ids = array_column($promotes, 'id'); $ids = array_column($promotes, 'id');
if ($localId !== PID) { if ($localId !== PID && !in_array($localId, $ids)) {
array_push($ids, $localId); array_push($ids, $localId);
} }
if ($page == 1) { if ($page == 1 && !in_array(PID, $ids)) {
array_push($ids, PID); array_push($ids, PID);
} }
$allPromote = M('promote', 'tab_')->field(['id'])->where($map)->select(); $allPromote = M('promote', 'tab_')->field(['id'])->where($map)->select();

Loading…
Cancel
Save