新增:批量删除ids为空删除全部

This commit is contained in:
yystopf 2023-11-14 10:37:16 +08:00
parent 2437bda410
commit 32386c2f66
1 changed files with 5 additions and 1 deletions

View File

@ -120,7 +120,11 @@ class Api::Pm::IssuesController < Api::Pm::BaseController
return render_not_found("ID为#{id}的疑修不存在!")
end
end
@issues = Issue.where(id: params[:ids], pm_project_id: params[:pm_project_id])
if params[:ids].blank?
@issues = Issue.where(pm_project_id: params[:pm_project_id])
else
@issues = Issue.where(id: params[:ids], pm_project_id: params[:pm_project_id])
end
end