From 5644570c1e2e782769f386d42ea33e287882fc96 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 27 Nov 2020 14:49:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/PromoteCompanyController.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 908635d09..0d47f5553 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -289,14 +289,22 @@ class PromoteCompanyController extends ThinkController if ($batchType == 1) { // 批量增加 $where['_string'] = "concat(',', game_ids, ',') not like \"%,{$gameId},%\""; $exp = "trim(BOTH ',' FROM concat(game_ids, ',', {$gameId}))"; + $op_name = "批量上架"; } if ($batchType == 2) { // 批量删除 $where['_string'] = "concat(',', game_ids, ',') like \"%,{$gameId},%\""; $exp = "trim(BOTH ',' FROM replace(concat(',', game_ids, ','), \",{$gameId},\", ','))"; + $op_name = "批量下架"; } M('promote', 'tab_')->where($where)->save([ 'game_ids' => ['exp', $exp] ]); + //加入日志 + $companys = M('promote_company', 'tab_')->field("id")->where($where)->select(); + if(!empty($companys)){ + $company_ids = implode(",",array_column($companys,"id")); + addOperationLog(['op_type'=>1,'key'=>"","op_name"=>$op_name,"content"=>json_encode(["company_id"=>$company_ids,"batchCompanyType"=>$batchCompanyType,"game_id"=>$gameId,'batch_type'=>$batchType])]); + } M('promote_company', 'tab_')->where($where)->save([ 'game_ids' => ['exp', $exp]