fix error

This commit is contained in:
chiu committed 2020-09-01 14:24:28 +08:00
1 parent 42586bb546
commit aca4818b7b
1 file changed
+2 -1
+2 -1
View File
@@ -10,7 +10,8 @@ module BulletinModel
AnnsCache.where(parent_id:self.id).destroy
elsif self.class == Bulletin || (self.class == Page && self.module == "announcement")
if self.class == Bulletin
BulletinFeedCache.where(:uid.in => BulletinFeed.where(:tag_ids.in => Array(self.tag_ids).collect{|v| v.to_s}).pluck(:uid)).destroy
tmp_tag_ids = (Array(self.tag_ids) + Array(Bulletin.find(self.id).tag_ids)).uniq
BulletinFeedCache.where(:uid.in => BulletinFeed.where(:tag_ids.in => tmp_tag_ids.collect{|v| v.to_s}).pluck(:uid)).destroy
end
AnnsCache.all.destroy
end