update rake shop:create

This commit is contained in:
Thein Lin Kyaw
2020-01-23 16:27:12 +06:30
parent 122fdcb7f8
commit 117cd39d35

View File

@@ -3,7 +3,7 @@ namespace :shop do
task :create, [:name, :shop_code, :subdomain, :client_name, :client_code, :address, :phone_no] => :environment do |t, args| task :create, [:name, :shop_code, :subdomain, :client_name, :client_code, :address, :phone_no] => :environment do |t, args|
ActiveRecord::Base.connection.execute("INSERT INTO shops (logo, name, shop_code, subdomain, client_name, client_code, address, township, city, state, country, phone_no, reservation_no, license, activated_at, license_data, base_currency, cloud_url, cloud_token, owner_token, id_prefix, is_rounding_adj, quick_sale_summary, calc_tax_order, show_account_info, note, created_at, updated_at) ActiveRecord::Base.connection.execute("INSERT INTO shops (logo, name, shop_code, subdomain, client_name, client_code, address, township, city, state, country, phone_no, reservation_no, license, activated_at, license_data, base_currency, cloud_url, cloud_token, owner_token, id_prefix, is_rounding_adj, quick_sale_summary, calc_tax_order, show_account_info, note, created_at, updated_at)
VALUES (NULL, '#{args.name}', '#{args.shop_code}', '#{args.subdomain}', '#{args.client_name}', '#{args.client_code}', '#{args.address}', '', '', '', '', '#{args.phone_no}', '111', '', CURRENT_TIMESTAMP(), 'test', '111', NULL, NULL, NULL, '111', 0, 0, 0, 1, CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP())") VALUES (NULL, '#{args.name}', '#{args.shop_code}', '#{args.subdomain}', '#{args.client_name}', '#{args.client_code}', '#{args.address}', '', '', '', '', '#{args.phone_no}', '111', '', CURRENT_TIMESTAMP(), 'test', '111', NULL, NULL, NULL, '111', 0, 0, 0, 1, '',CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP())")
logger.info " Shop created for #{args.name}-#{args.shop_code}" logger.info " Shop created for #{args.name}-#{args.shop_code}"
gateway_communication_type =Lookup.create([{lookup_type:'gateway_communication_type',name: 'API',value: 'api',shop_code: args.shop_code}, gateway_communication_type =Lookup.create([{lookup_type:'gateway_communication_type',name: 'API',value: 'api',shop_code: args.shop_code},