企业开通

dev_SaaS
jingquan huang 6 years ago
parent cb73a97425
commit 8267a5645e

@ -33,8 +33,12 @@ class EcloudController < ApplicationController
# ecordercode 唯一标志一个企业的订购关系 # ecordercode 唯一标志一个企业的订购关系
def bs_new def bs_new
begin begin
Ecloud.create!(applyno: params['applyno'], ecordercode: params['ecordercode'], opttype: params['opttype'], trial: params['trial'], Ecloud.create!(applyno: params['applyno'], ecordercode: params['ecordercode'], opttype: params['opttype'],
bossorderid: params['bossorderid'], custid: params['custid'], custcode: params['custcode']) trial: params['trial'], bossorderid: params['bossorderid'], custid: params['custid'],
custcode: params['custcode'], registersource: params['registersource'], custname: params['custname'],
userid: params['userid'], username: params['username'], useralias: params['useralias'], mobile: params['mobile'],
email: params['email'], productcode: params['productcode'], begintime: params['begintime'],
endtime: params['endtime'])
render :json => {result: true, errmsg: ""} render :json => {result: true, errmsg: ""}
rescue Exception => e rescue Exception => e
@ -45,7 +49,8 @@ class EcloudController < ApplicationController
# 企业更新 # 企业更新
def bs_update def bs_update
ecloud = Ecloud.where(custid: params['custid']).first
ecloud.update_attribute()
end end
# 用户业务开通接口 # 用户业务开通接口

@ -1,5 +1,6 @@
class Ecloud < ActiveRecord::Base class Ecloud < ActiveRecord::Base
attr_accessible :applyno, :begintime, :bossorderid, :custcode, :custid, :custname, :custtype, :ecordercode, :endtime, :mobile, :opttype, :productcode, :registersource, :string, :trial, :useralias, :userid, :username attr_accessible :applyno, :begintime, :bossorderid, :custcode, :custid, :custname, :custtype, :ecordercode, :endtime,
:mobile, :opttype, :productcode, :registersource, :string, :trial, :useralias, :userid, :username, :email
has_many :ecloud_users has_many :ecloud_users
has_many :ecloud_services has_many :ecloud_services
end end

@ -0,0 +1,5 @@
class AddEmailToEcloud < ActiveRecord::Migration
def change
add_column :eclouds, :email, :string
end
end
Loading…
Cancel
Save