From e9fe238b02d5e1c982bfc85b4c03843aa769a44b Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 14 Mar 2019 16:38:07 +0800 Subject: [PATCH] =?UTF-8?q?500=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/ecloud_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'])