$uid, 'link_id' => $id, 'category' => 1, 'type' => $type])) { return self::where(['uid' => $uid, 'link_id' => $id, 'type' => $type, 'category' => 1])->delete(); } else { return self::set(['uid' => $uid, 'link_id' => $id, 'type' => $type, 'category' => 1, 'add_time' => time()]); } } }