From ce21545360854a3b1284b86e4169bcab08b36184 Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Tue, 26 Nov 2019 14:42:57 +0800 Subject: [PATCH] =?UTF-8?q?oa-=E5=85=B3=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/PromoteController.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index af1f3e999..23dfe98f8 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -98,6 +98,7 @@ unset($_REQUEST['parent_id']); $promote = D(self::model_name)->field('id,account')->where(['oa_associated' => 0])->order('id DESC')->select(); $oa_data = array_column($oa_data, 'platform_account'); foreach($promote as $k => $v) { + $v['account'] = trim($v['account']); if(in_array($v['account'], $oa_data)) { M('promote','tab_')->where(['id' => $v['id']])->setField(['oa_associated' => 1]); } @@ -109,8 +110,9 @@ unset($_REQUEST['parent_id']); if(I('oa_associated',-1) == -1) { foreach($list_data as $k => $v) { + $list_data[$k]['account'] = trim($v['account']); if($v['oa_associated'] != 1) { - $oa_data[] = $v['account']; + $oa_data[] = $list_data[$k]['account']; } } if(!empty($oa_data))