For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Implement two-code system (team + family) for guides and complete mini-program invite flow
Architecture: Backend adds type field to GuideInviteCode, mini-program checks invite code type on registration to route correctly (register → apply → join), Web admin shows both codes in Layout.vue dialog
Tech Stack: Spring Boot 2.7.18, uni-app Vue 2, Vue 2 + Element UI
Files:
zxyj-backend/.../entity/GuideInviteCode.java:24 (add type field)zxyj-backend/.../service/GuideInviteCodeService.java (support type in create/generate)zxyj-backend/.../controller/guide/GuideTeamController.java (add type to invite-code response)Details:
private String type; to GuideInviteCode with values "team" / "family""team" in generateInviteCode()createInviteCode() checks existing by guideId + type, not just guideIdGuideTeamController.getMyInviteCode() accepts optional type param (defaults to "team")POST /api/guide/team/invite-code/family returns family-type codeFiles:
zxyj-backend/.../service/GuideInviteCodeService.javazxyj-backend/.../controller/guide/GuideManagementController.javaDetails:
validateInviteCode(code, type) — validates code matches the expected typePOST /api/guide/invite-code/validate enhanced to return code type + guide info{ valid, type, guideId, guideName, code }Files:
zxyj-backend/.../controller/guide/GuideTeamController.javaEndpoints:
POST /api/guide/team/join — accept { inviteCode, userId }, validates code, checks if user is already a teacher, if in another team → error telling them to leave firstPOST /api/guide/team/leave — removes user from team (clears teacher_no or team relation)POST /api/guide/team/check-status — returns { isTeacher, inTeam, teamId } for the invite code flow routingFiles:
zxyj-web/src/api/guide.js — add getMyFamilyInviteCode()zxyj-web/src/views/Layout.vue — extend invite code dialogDetails:
Files:
zxyj-frontend/pages/login/login.vuezxyj-frontend/utils/api.jsDetails:
POST /api/auth/register-with-invite with { phone, code, inviteCode, nickname }Files:
zxyj-frontend/pages/guide/apply/index.vue (guide application page)zxyj-frontend/pages/teacher/index.vuezxyj-frontend/App.vueDetails:
role=teacher → redirect to confirm team jointeacherStatus=pending → show application pending pageinviteCodeInfo in global state (guide name, code type)Files:
zxyj-frontend/pages/guide/team-confirm/index.vueDetails:
/api/guide/team/joinFiles:
zxyj-backend/.../config/DatabaseInitializer.javaSQL:
ALTER TABLE guide_invite_codes ADD COLUMN type VARCHAR(20) DEFAULT 'team' COMMENT '邀请码类型: team/family';
ALTER TABLE guide_invite_codes ADD INDEX idx_type (type);
Files:
zxyj-frontend/pages/login/login.vue or registration pageDetails:
/api/guide/team/check-status to determine next step