dev_aliyun
p31729568 5 years ago
parent 1cf7c521d8
commit cb28d70419

@ -17,6 +17,11 @@ class ProjectPackages::SaveService
raise Error, '竞标截止时间不能小于当前时间' if params[:deadline_at].present? && params[:deadline_at].to_time < Time.now raise Error, '竞标截止时间不能小于当前时间' if params[:deadline_at].present? && params[:deadline_at].to_time < Time.now
if params[:min_price].blank? && params[:max_price].present?
params[:min_price] = params[:max_price]
params[:max_price] = nil
end
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
package.assign_attributes(params) package.assign_attributes(params)
package.save! package.save!

Loading…
Cancel
Save