This commit is contained in:
oneao committed 2026-03-02 22:09:47 +08:00
1 parent cf23acdabc
commit 2efeb7cee2
13 files changed
+271 -49

No files matched your search

+4 -3
View File
@@ -39,7 +39,7 @@ FROM space s
GROUP BY space_id
) mc
ON s.id = mc.space_id
WHERE sm.user_id = $1
WHERE sm.user_id = $1 AND s.status != 2 AND sm.status != 2
ORDER BY sm.is_default DESC, sm.sort_number ASC;
-- name: GetSpaceByUserIdAndSpaceId :one
@@ -51,7 +51,8 @@ SELECT
COALESCE(mc.member_count, 0) AS member_count,
sm.is_default,
sm.member_name,
sm.sort_number
sm.sort_number,
s.invite_code
FROM space s
JOIN space_member sm
ON s.id = sm.space_id
@@ -61,7 +62,7 @@ FROM space s
GROUP BY space_id
) mc
ON s.id = mc.space_id
WHERE sm.user_id = $1 AND s.id = $2
WHERE sm.user_id = $1 AND s.id = $2 AND s.status != 2 AND sm.status != 2
ORDER BY sm.is_default DESC, sm.sort_number ASC;
-- name: UpdateSpaceName :exec