public function create($userId, $token)
{
$params = [];
$params['user_id'] = $userId;
$params['token'] = $token;
$data = $this->getByUserId($userId);
if (empty($data)) {
$ret = $this->reminderTokenRepo->insert($params);
} else {
$wkey = ['id' => $data->id];
$ret = $this->reminderTokenRepo->update($params, $wkey);
}
return $ret;
}