FROM wx_shop WHERE tenant_id = 1022 AND building = 1250
## 3. 关联虚拟商户和铺位
@@ -28,3 +28,11 @@ SELECT id,'1022',NULL,shop_id,1,1,NAME,link_phone,NOW(),NOW(),0 FROM wx_merchant
INSERT INTO `wx_shop_users` (`id`,`tenant_id`,`parent_tenant_id`,`shop_id`,`type`,`principal_type`,`name`,`phone`,`create_date`,`update_date`,`status`)
SELECT id,'1022',NULL,shop_id,1,1,merchant_name,phone,NOW(),NOW(),0 FROM wx_merchant_shop_mulity_ttttt
wx_merchant_shop_567;
wx_merchant_567;
UPDATE wx_merchant_shop_567 INNER JOIN wx_merchant_567 ON wx_merchant_shop_567.`merchant_id` = wx_merchant_567.`id`
SET wx_merchant_shop_567.`name` = wx_merchant_567.`name`,wx_merchant_shop_567.`phone` = wx_merchant_567.`link_phone`;