|
|
@@ -14,8 +14,6 @@ CREATE PROCEDURE sp_data_migration_wcmmetatable(IN citySuffix VARCHAR(20),
|
|
|
DECLARE isover INT DEFAULT 0;
|
|
|
DECLARE f_TABLEINFOID INT DEFAULT 0;
|
|
|
DECLARE f_TABLENAME VARCHAR(200) DEFAULT NULL;
|
|
|
- DECLARE f_CHNLID int(11) DEFAULT '0';
|
|
|
- DECLARE f_DOCID int(11) DEFAULT '0';
|
|
|
|
|
|
|
|
|
DECLARE cur CURSOR FOR
|
|
|
@@ -41,14 +39,14 @@ CREATE PROCEDURE sp_data_migration_wcmmetatable(IN citySuffix VARCHAR(20),
|
|
|
|
|
|
THEN
|
|
|
|
|
|
-
|
|
|
- SET @metaTableExists = (SELECT count(1) from information_schema.tables where table_schema = 'trs_hycloud_iip' and table_name = concat('wcmmetatable', f_TABLENAME) );
|
|
|
+
|
|
|
+ SET @metaTableExists = (SELECT count(1) from information_schema.tables where table_schema = 'trs_hycloud_iip' and table_name = concat('wcmmetatable', f_TABLENAME, citySuffix) );
|
|
|
|
|
|
IF (@metaTableExists > 0)
|
|
|
|
|
|
THEN
|
|
|
|
|
|
- select concat('开始更新 ', 'wcmmetatable', f_TABLENAME, '.MetaDataId & ChannelId') info;
|
|
|
+ select concat('开始更新 ', 'wcmmetatable', f_TABLENAME, citySuffix, '.MetaDataId & ChannelId') info;
|
|
|
|
|
|
set @del_sql = concat('delete from trs_data_migration.meta_data');
|
|
|
prepare stmt from @del_sql;
|
|
|
@@ -61,9 +59,7 @@ CREATE PROCEDURE sp_data_migration_wcmmetatable(IN citySuffix VARCHAR(20),
|
|
|
EXECUTE stmt;
|
|
|
deallocate prepare stmt;
|
|
|
|
|
|
- call sp_data_migration_wcmmetablexx(concat('wcmmetatable', f_TABLENAME), prevDocId, docIdOffset, channelIdOffset);
|
|
|
-
|
|
|
- select concat('完成更新 ', 'wcmmetatable', f_TABLENAME, '.MetaDataId & ChannelId') info;
|
|
|
+ select concat('完成更新 ', 'wcmmetatable', f_TABLENAME, citySuffix, '.MetaDataId & ChannelId') info;
|
|
|
END IF ;
|
|
|
|
|
|
END IF ;
|