智能组卷应排除未发布的编程题

dev_new_shixunsrepository
cxt 5 years ago
parent bb5dcfd7e3
commit 90c4c3826d

@ -19,7 +19,8 @@ class OptionalItemQuery < ApplicationQuery
end
if hacks.present?
items = ItemBank.where(container_id: hacks.where(status: 1).pluck(:id), container_type: "Hack").or(ItemBank.where(id: items.pluck(:id)))
items = ItemBank.where(container_id: hacks.where(status: 1).pluck(:id), container_type: "Hack")
.or(ItemBank.where(id: items.pluck(:id)).where("item_type != '6'"))
end
public = source.present? ? source.to_i : 1

Loading…
Cancel
Save