/** * 删除分享评论 * @param int $comment_id 评论编号 * @return void */ public function deleteShareComment($comment_id) { $comment = ShareService::getShareComment($comment_id); if (empty($comment)) { return; } FDB::delete('share_comment', 'comment_id = ' . $comment_id); $share_id = $comment['share_id']; //分享评论数量减1 FDB::query('UPDATE ' . FDB::table('share') . ' SET comment_count = comment_count - 1 WHERE share_id = ' . $share_id . ' and comment_count >=1 '); //清除分享评论列表缓存 ShareService::updateShareCache($share_id, 'comments'); }