refactor: 动态计算商店前置任务等级
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-04-26 23:57:40 +08:00
parent 073db875eb
commit 6781178f6c
3 changed files with 66 additions and 9 deletions

View File

@@ -39,4 +39,15 @@ WHERE deleted_at IS NULL;
--房间索引
CREATE UNIQUE INDEX uk_player_room_house
ON player_room_house (player_id, is_vip)
WHERE deleted_at IS NULL;
WHERE deleted_at IS NULL;
-- 集市权限角色 联合唯一
-- 先清理历史重复授权保留每组 userId + roleId id 最小的一条
DELETE FROM base_sys_user_role a
USING base_sys_user_role b
WHERE a."userId" = b."userId"
AND a."roleId" = b."roleId"
AND a.id > b.id;
CREATE UNIQUE INDEX IF NOT EXISTS uk_base_sys_user_role_user_role
ON base_sys_user_role ("userId", "roleId");