diff --git a/app/controllers/ecloud_controller.rb b/app/controllers/ecloud_controller.rb index deff445c..d104195e 100644 --- a/app/controllers/ecloud_controller.rb +++ b/app/controllers/ecloud_controller.rb @@ -71,7 +71,7 @@ class EcloudController < ApplicationController # 注销试用的套餐 ## 需要注销的套餐; 试用转商用是不会有批量操作的,所以可以使用first des_service = params['services'].select{|s| s['opttype'] == 1}.first - esd = EcloudService.where(ecloud_id: ecloud.try(:id), code: des_service['code'], productcode: params['productcode']).first + esd = EcloudService.where(ecloud_id: ecloud.try(:id), code: des_service['code']).first ecloud.update_attribute(:trial, params['trial']) esd.update_attributes!(opttype: des_service['opttype'], begintime: des_service['begintime'], endtime: des_service['endtime'])