where(['name' => 'follow_day'])->update(['value' => $follow_day]); $deal_day = $param['deal_day'] ? : 0; $resDeal = db('crm_config')->where(['name' => 'deal_day'])->update(['value' => $deal_day]); } $resConfig = db('crm_config')->where(['name' => 'config'])->update(['value' => $config]); if ($remind_config == 1) { $remind_day = $param['remind_day'] ? : 0; $resRemind = db('crm_config')->where(['name' => 'remind_day'])->update(['value' => $remind_day]); } $resRemindConfig = db('crm_config')->where(['name' => 'remind_config'])->update(['value' => $remind_config]); return true; } /** * 获取相关信息 * @author Michael_xu * @param * @return */ public function getData() { $list = db('crm_config')->select(); $data = []; foreach ($list as $k=>$v) { $data[$v['name']] = $v['value']; } return $data ? : []; } }