Ecmal batch add stores (including partitions and permissions)

  
 

ShowBox's mall is basically coming to an end. Some time ago introduced "ECmall batch add users." However, I found that there was no way to add malls in batches, so I spent another night researching adding malls in SQL, including partitions and permissions. First use this statement to call the store name and the owner name in A1 of Excel
, and call the owner id in B1 to generate the code to join the opening mall: ‘‘=CONCATENATE(INSERT INTO ecm_store VALUES (“, B1, ”‘, ‘”,A1,”‘, ‘”,A1,”‘, ”, NULL, ”, ”, ”, ”, ’1′ , ”, ’0′, ’0.00′, NULL, ’1′, ”, ’1282202793′, ’0′, NULL, ’14′, ’1′, ”, NULL , NULL , NULL , ”, ”, ”, ”, ”, ”);)’’‘‘INSERT INTO ecm_store VALUES (’14′, ‘A101′, &lsquo ;A101′, ”, NULL, ”, ”, ”, ”, ’1′, ”, ’0′, ’0.00′, NULL, ’1′, ”, ’1282202793′, ’0′, NULL, ’14′, ’1′, ”, NULL , NULL , NULL , ”, ”, &rdq Uo;, ”, ”, ”);’’ Then found that the mall partition is not set in the store's table, but also studied the partition and store relationship table. Use the Excel statement to call the store id in B1 to call the partition id in C1 to produce the SQL statement: ‘‘=CONCATENATE(INSERT INTO ecm_category_store (cate_id, store_id) VALUES (‘”,c1,”‘, ‘” ,B1,”‘);)’’‘‘INSERT INTO ecm_category_store (cate_id, store_id) VALUES (’1′, ’14′);’’ originally thought this would be fine, the result In the morning, after testing, they found that the permissions were wrong. So I re-examined the permission. We found that we used the all permission, so use the Excel statement to call the user id and the store id in D1 (I am the same): &lsquo ;‘=CONCATENATE(“INSERT INTO ecm_user_priv ( user_id , store_id , privs ) VALUES (‘”,D1,”‘, ‘”,D1,”‘, ‘all’); ”)’’‘‘INSERT INTO ecm_user_priv ( user_id , store_id , privs ) VALUES (‘”,14,”‘, ‘”,14,”‘, ‘all&rsquo ;);’’Last You can use ·· you have added more than 300 users ···

Copyright © Windows knowledge All Rights Reserved