From 8114e691d26a20fafbcddb278108ee105cc57906 Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Tue, 14 Apr 2020 15:24:59 +0800 Subject: [PATCH] =?UTF-8?q?ios=20=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/DownloadController.class.php | 11 +++++++++-- Application/Home/Controller/QueryController.class.php | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) 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();