/** * 保存影厅信息 * @param $attributes * @return bool|mixed */ public function saveScreen($attributes) { $model = new Screen(); $attributes['screen_code'] >= 10 ?: ($attributes['screen_code'] = "0" . $attributes['screen_code']); $attributes['ctime'] = TIME; $attributes['utime'] = TIME; $model->attributes = $attributes; $status = $model->save(false); if ($status) { return $model->primaryKey; } else { return false; } }