diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index fe17339a5..e1e2609fb 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -2426,12 +2426,19 @@ public function iosDetailExcelInfo($id,$map) { $data = M('promote', 'tab_')->field(['id'])->where($map1) ->limit(($i-1)*$perSize ,$perSize)->select(); $ids = array_column($data, 'id'); + + if (in_array($map['localId'], $ids)) { + }else { + + } if ($i == 1) { - if (!empty($map['localId'])) { + if (!empty($map['localId']) && !in_array($map['localId'], $ids)) { array_unshift($ids,$map['localId'] ); } + if (!in_array(PID, $ids)) { + array_unshift($ids, PID); + } - array_unshift($ids, PID); } foreach($ids as $key => $id) { diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 9101cac4e..d09b4ae87 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -2527,10 +2527,10 @@ class QueryController extends BaseController $query = M('promote', 'tab_')->field(['id'])->where($map); list($promotes, $pagination, $count) = $this->paginate($query); $ids = array_column($promotes, 'id'); - if ($localId !== PID) { + if ($localId !== PID && !in_array($localId, $ids)) { array_push($ids, $localId); } - if ($page == 1) { + if ($page == 1 && !in_array(PID, $ids)) { array_push($ids, PID); } $allPromote = M('promote', 'tab_')->field(['id'])->where($map)->select();