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]); - } - } }