Files
integral-shop/docs/company-byxsj33-data-imgration-93229-93230-supplement.sql
danaisuiyuan eb349ffa74 chore(czcf82): Spring profiles, migration docs, and shop URLs
Add per-shop application YAML, company data migration notes and SQL
supplements, and point admin, API, and uni-app at czcf82 endpoints.

Made-with: Cursor
2026-04-26 15:55:22 +08:00

57 lines
1.4 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- byxsj33 migration supplement for missing bonus/integral values
-- 目标库byxsj33 环境的 yangtangyoupin
-- 执行方式mysql -h 39.106.63.33 -u yangtangyoupin -p yangtangyoupin < docs/company-byxsj33-data-imgration-93229-93230-supplement.sql
--
-- 口径说明:
-- 1) user_id=93230: self_bonus=10436.000 (5218.000*2), integral=5218.000
-- 2) user_id=93229: self_bonus=12407.560 (6203.780*2), integral=4222.150
--
-- 回滚建议(执行前先记录原值):
-- SELECT id, self_bonus FROM wa_users WHERE id IN (93229, 93230);
-- SELECT uid, integral FROM eb_user WHERE uid IN (93229, 93230);
SET NAMES utf8mb4;
START TRANSACTION;
-- 执行前核对(建议先确认两表均命中 2 行)
SELECT id, self_bonus
FROM wa_users
WHERE id IN (93229, 93230)
ORDER BY id;
SELECT uid, integral
FROM eb_user
WHERE uid IN (93229, 93230)
ORDER BY uid;
-- wa_users 个人奖金补齐
UPDATE wa_users
SET self_bonus = CASE id
WHEN 93229 THEN 12407.560
WHEN 93230 THEN 10436.000
ELSE self_bonus
END
WHERE id IN (93229, 93230);
-- eb_user 易积分补齐
UPDATE eb_user
SET integral = CASE uid
WHEN 93229 THEN 4222.150
WHEN 93230 THEN 5218.000
ELSE integral
END
WHERE uid IN (93229, 93230);
-- 执行后核对
SELECT id, self_bonus
FROM wa_users
WHERE id IN (93229, 93230)
ORDER BY id;
SELECT uid, integral
FROM eb_user
WHERE uid IN (93229, 93230)
ORDER BY uid;
COMMIT;