示例#1
0
 /**
  * 保存影厅信息
  * @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;
     }
 }
示例#2
0
 /**
  * 更新影厅信息
  *
  * @param $attributes
  * @param $condition
  * @return int
  */
 public function updateScreen($attributes, $condition)
 {
     return Screen::updateAll($attributes, $condition);
 }