From 1b90124f81e185f5237a49e034cc0386cdcdd797 Mon Sep 17 00:00:00 2001 From: elf <360197197@qq.com> Date: Fri, 17 Dec 2021 12:20:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PromoteCompanyWarningController.class.php | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/Application/Admin/Controller/PromoteCompanyWarningController.class.php b/Application/Admin/Controller/PromoteCompanyWarningController.class.php index e4ac672e8..7cb20d72c 100644 --- a/Application/Admin/Controller/PromoteCompanyWarningController.class.php +++ b/Application/Admin/Controller/PromoteCompanyWarningController.class.php @@ -227,25 +227,4 @@ class PromoteCompanyWarningController extends ThinkController 'message' => '操作成功' ]); } - - public function setCompanyMontlyIsWarning($month = '') - { - if (!$month) { - $month = date('Y-m'); - } - $monthNumber = date('Ym', strtotime($month.'-01')); - - $conditions = ['_string' => '1=1']; - $conditions['month'] = $monthNumber; - $conditions['pay_amount'] = ['egt', C('PRO_COM_MONTHLY_AMOUNT', null, 50000)]; - - $subSql = M('company_monthly_data', 'tab_')->field('company_id')->where(['month' => ['lt', $monthNumber], 'is_warning' => 1])->select(false); - $conditions['_string'] .= ' and company_id not in(' . $subSql . ')'; - - M('company_monthly_data', 'tab_')->where(['month' => $monthNumber])->save(['is_warning' => 0]); - $rows = M('company_monthly_data', 'tab_')->field(['id'])->where($conditions)->select(); - if (count($rows) > 0) { - M('company_monthly_data', 'tab_')->where(['id' => ['in', array_column($rows, 'id')]])->save(['is_warning' => 1]); - } - } }