where('title', $keywords)->find(); if ($is_exist) { $res = $is_exist['id']; } else { $res = $this->strict(false)->field(true)->insertGetId(['title' => $keywords, 'create_time' => time()]); } return $res; } }