2026年5月29日 02:28
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
UPDATE `la_community_post`
|
||||
SET `images` = REPLACE(`images`, 'https://tk2cdn-ali.tprswe.com/', 'https://tk2cdn.ai4funs.com/')
|
||||
WHERE `origin_id` LIKE '49baodian:%'
|
||||
AND `images` LIKE '%https://tk2cdn-ali.tprswe.com/%';
|
||||
|
||||
UPDATE `la_community_post`
|
||||
SET `images` = REPLACE(`images`, 'https://tk2cdn-hw.thc517.com/', 'https://tk2cdn.ai4funs.com/')
|
||||
WHERE `origin_id` LIKE '49baodian:%'
|
||||
AND `images` LIKE '%https://tk2cdn-hw.thc517.com/%';
|
||||
|
||||
UPDATE `la_community_post`
|
||||
SET `ext` = REPLACE(`ext`, 'https://tk2cdn-ali.tprswe.com/', 'https://tk2cdn.ai4funs.com/')
|
||||
WHERE `origin_id` LIKE '49baodian:%'
|
||||
AND `ext` LIKE '%https://tk2cdn-ali.tprswe.com/%';
|
||||
|
||||
UPDATE `la_community_post`
|
||||
SET `ext` = REPLACE(`ext`, 'https://tk2cdn-hw.thc517.com/', 'https://tk2cdn.ai4funs.com/')
|
||||
WHERE `origin_id` LIKE '49baodian:%'
|
||||
AND `ext` LIKE '%https://tk2cdn-hw.thc517.com/%';
|
||||
|
||||
UPDATE `la_community_post_image`
|
||||
SET `image_url` = REPLACE(`image_url`, 'https://tk2cdn-ali.tprswe.com/', 'https://tk2cdn.ai4funs.com/')
|
||||
WHERE `image_url` LIKE 'https://tk2cdn-ali.tprswe.com/%';
|
||||
|
||||
UPDATE `la_community_post_image`
|
||||
SET `image_url` = REPLACE(`image_url`, 'https://tk2cdn-hw.thc517.com/', 'https://tk2cdn.ai4funs.com/')
|
||||
WHERE `image_url` LIKE 'https://tk2cdn-hw.thc517.com/%';
|
||||
@@ -0,0 +1,55 @@
|
||||
START TRANSACTION;
|
||||
|
||||
INSERT INTO `la_community_tag` (`name`, `icon`, `sort`, `post_count`, `is_hot`, `status`, `create_time`)
|
||||
SELECT '旧澳六合', '', 11, 0, 0, 1, UNIX_TIMESTAMP()
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `la_community_tag` WHERE `name` = '旧澳六合'
|
||||
);
|
||||
|
||||
INSERT INTO `la_community_tag` (`name`, `icon`, `sort`, `post_count`, `is_hot`, `status`, `create_time`)
|
||||
SELECT '新澳六合', '', 12, 0, 0, 1, UNIX_TIMESTAMP()
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `la_community_tag` WHERE `name` = '新澳六合'
|
||||
);
|
||||
|
||||
INSERT IGNORE INTO `la_community_post_tag` (`post_id`, `tag_id`)
|
||||
SELECT p.id, t.id
|
||||
FROM `la_community_post` p
|
||||
INNER JOIN `la_community_tag` t ON t.`name` = '旧澳六合'
|
||||
WHERE p.`origin_id` LIKE '49baodian:draw:a6:%'
|
||||
OR p.`origin_id` LIKE '49baodian:gallery:a6:%'
|
||||
OR (
|
||||
p.`origin_id` LIKE '49baodian:gallery:%'
|
||||
AND p.`origin_id` NOT LIKE '49baodian:gallery:xa6:%'
|
||||
AND p.`origin_id` NOT LIKE '49baodian:gallery:a6:%'
|
||||
)
|
||||
OR (
|
||||
p.`origin_id` LIKE '49baodian:draw:%'
|
||||
AND p.`origin_id` NOT LIKE '49baodian:draw:xa6:%'
|
||||
);
|
||||
|
||||
INSERT IGNORE INTO `la_community_post_tag` (`post_id`, `tag_id`)
|
||||
SELECT p.id, t.id
|
||||
FROM `la_community_post` p
|
||||
INNER JOIN `la_community_tag` t ON t.`name` = '新澳六合'
|
||||
WHERE p.`origin_id` LIKE '49baodian:draw:xa6:%'
|
||||
OR p.`origin_id` LIKE '49baodian:gallery:xa6:%';
|
||||
|
||||
INSERT IGNORE INTO `la_community_post_tag` (`post_id`, `tag_id`)
|
||||
SELECT p.id, t.id
|
||||
FROM `la_community_post` p
|
||||
INNER JOIN `la_community_tag` t ON t.`name` = '彩票'
|
||||
WHERE p.`origin_id` LIKE '49baodian:%';
|
||||
|
||||
UPDATE `la_community_tag` t
|
||||
SET `post_count` = (
|
||||
SELECT COUNT(*)
|
||||
FROM `la_community_post_tag` pt
|
||||
INNER JOIN `la_community_post` p ON p.`id` = pt.`post_id`
|
||||
WHERE pt.`tag_id` = t.`id`
|
||||
AND p.`status` = 1
|
||||
AND p.`delete_time` IS NULL
|
||||
)
|
||||
WHERE t.`name` IN ('彩票', '旧澳六合', '新澳六合');
|
||||
|
||||
COMMIT;
|
||||
@@ -0,0 +1,7 @@
|
||||
INSERT INTO `la_dev_crontab` (`name`, `type`, `system`, `remark`, `command`, `params`, `status`, `expression`, `create_time`, `update_time`)
|
||||
SELECT '世界杯英文文章翻译预热', 1, 0, '仅翻译世界杯分类中疑似英文文章,预热翻译缓存', 'worldcup_article_translate', '', 1, '*/10 * * * *', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `la_dev_crontab`
|
||||
WHERE `command` = 'worldcup_article_translate'
|
||||
AND `delete_time` IS NULL
|
||||
);
|
||||
@@ -0,0 +1,43 @@
|
||||
INSERT INTO `la_community_tag` (`name`, `icon`, `sort`, `post_count`, `is_hot`, `status`, `create_time`)
|
||||
SELECT '世界杯', '', 90, 0, 1, 1, UNIX_TIMESTAMP()
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `la_community_tag` WHERE `name` = '世界杯'
|
||||
);
|
||||
|
||||
INSERT INTO `la_community_post` (`user_id`, `content`, `images`, `post_type`, `match_id`, `is_paid`, `price_points`, `free_content_len`, `status`, `create_time`, `update_time`)
|
||||
SELECT 1, '世界杯开赛氛围越来越浓了,大家觉得本届最大的黑马会是谁?', '[]', 0, 0, 0, 0, 100, 1, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `la_community_post` WHERE `content` = '世界杯开赛氛围越来越浓了,大家觉得本届最大的黑马会是谁?'
|
||||
);
|
||||
|
||||
INSERT INTO `la_community_post` (`user_id`, `content`, `images`, `post_type`, `match_id`, `is_paid`, `price_points`, `free_content_len`, `status`, `create_time`, `update_time`)
|
||||
SELECT 1, '我更看好防守稳一点的球队,世界杯这种大赛还是先稳住再说。', '[]', 0, 0, 0, 0, 100, 1, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `la_community_post` WHERE `content` = '我更看好防守稳一点的球队,世界杯这种大赛还是先稳住再说。'
|
||||
);
|
||||
|
||||
INSERT INTO `la_community_post` (`user_id`, `content`, `images`, `post_type`, `match_id`, `is_paid`, `price_points`, `free_content_len`, `status`, `create_time`, `update_time`)
|
||||
SELECT 1, '这届世界杯的球员状态起伏很大,关键还是看临场调整和替补深度。', '[]', 0, 0, 0, 0, 100, 1, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM `la_community_post` WHERE `content` = '这届世界杯的球员状态起伏很大,关键还是看临场调整和替补深度。'
|
||||
);
|
||||
|
||||
INSERT INTO `la_community_post_tag` (`post_id`, `tag_id`)
|
||||
SELECT p.id, t.id
|
||||
FROM `la_community_post` p
|
||||
JOIN `la_community_tag` t ON t.`name` = '世界杯'
|
||||
WHERE p.`content` IN (
|
||||
'世界杯开赛氛围越来越浓了,大家觉得本届最大的黑马会是谁?',
|
||||
'我更看好防守稳一点的球队,世界杯这种大赛还是先稳住再说。',
|
||||
'这届世界杯的球员状态起伏很大,关键还是看临场调整和替补深度。'
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE `post_id` = `post_id`;
|
||||
|
||||
UPDATE `la_community_tag` t
|
||||
SET `post_count` = (
|
||||
SELECT COUNT(*)
|
||||
FROM `la_community_post_tag` pt
|
||||
JOIN `la_community_post` p ON p.id = pt.post_id AND p.delete_time IS NULL
|
||||
WHERE pt.tag_id = t.id
|
||||
)
|
||||
WHERE t.`name` = '世界杯';
|
||||
Reference in New Issue
Block a user