Commit Graph
17 Commits
Author SHA1 Message Date
YumeMichi 17336de1b7 Implement achievement list
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-13 06:54:32 +08:00
YumeMichi 0aacf8a4e9 Improve live and random live handling
- Add random live handlers, schemas and persistence for lot/play/continue/gameover/reward flow
- Update live status and schedule generation, including special rotation handling and CN timezone alignment
- Add config support for unlocking all daily special rotation songs and document the option
- Refresh live play, reward, precise score and session logic plus bundled main.db updates

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-06 20:59:45 +08:00
YumeMichi 0dd5df0302 Unify fallback and unimplemented API error handling
- Add a shared common error response schema and unknown error code for business-level fallbacks
- Return business error payloads for router NoRoute and NoMethod fallbacks
- Align the existing event list fallback response with the shared error structure
- Introduce an explicit unimplemented API error type instead of relying on formatted strings
- Make /api batch dispatch return per-item status 600 error entries for unimplemented modules and actions without failing the whole batch

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-06 17:13:27 +08:00
YumeMichi f6466989c6 Persist live status and migrate legacy live data
- Add user_live_status to store hi score, hi combo count, and clear count per chart
- Expand user_live_goal to persist achieved live_goal_reward_id entries instead of only coarse goal types
- Update live reward handling to refresh live status and sync newly achieved live goals on every clear
- Return live status and achieved goal ids from stored user data in /api/live/status
- Aggregate profile liveCnt from stored user_live_status instead of hardcoded values
- Load complete-rank thresholds from live info for goal evaluation
- Migrate legacy user_live_record data into user_live_status and backfill achievable live goals on startup

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-06 16:25:06 +08:00
YumeMichi f8a0f2db13 Refine live schedule data
- Add special_live_rotation_m data to main.db for rotated special live scheduling
- Split normal and special live queries to avoid selecting special-only columns from normal_live_m
- Build live schedule/status around rotated special lives and derived training lives
- Reuse user training energy values in login top info and live party list responses
- Set training energy and max training energy defaults to 999

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-06 15:57:06 +08:00
YumeMichi 45eef9566a Fix client friend status mapping
- Add explicit client friend status constants and resolver
- Return dynamic friend status from profileInfo and friend/search
- Accept invite_code when loading profileInfo targets
- Align live support friend status values with client expectations

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-05 22:55:00 +08:00
YumeMichi 750c2cf3d0 Implement secretbox handlers and align gacha behavior
- Add secretbox API schemas, handlers, and routes for all/showDetail/pon/multi
- Load secretbox server data through the shared serverdata loader
- Fix rarity mapping and pool rules for SR/SSR/UR special boxes
- Implement thanks festival pool behavior, including UR guarantee and SSR/UR-only rates
- Correct animation-related fields such as is_hit and lowest_rarity, and add rare UR promotion animation

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-05 21:57:04 +08:00
YumeMichi acd9be627e Minor cleanup and fixes
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-05 06:53:48 +08:00
YumeMichi c4f1686abb Implement present box
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-05 06:53:48 +08:00
YumeMichi 947da92a66 webui: Add user birthday settings
- Store birth month and day in user_pref with default 10/18
- Migrate existing user_pref rows to fill missing birthday fields
- Expose birthday editing in the webui profile page
- Replace hardcoded birthday values in user info, top info, and product list responses
- Fix birthday month/day field alignment in the profile form

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-05 05:48:36 +08:00
YumeMichi 101f7e8a3f Implement greet inbox and outbox
- Add user_greet model and startup table sync
- Implement /greet/user and /greet/delete handlers
- Implement noticeFriendGreeting inbox and noticeUserGreetingHistory outbox
- Return peer profile and center unit info for greeting notices
- Update login topInfo friend greet counters from unread inbox messages

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-05 01:54:59 +08:00
YumeMichi d48293be44 Implement friend APIs and target profile support
- Add friend search/list/request/requestCancel/response/expel handlers and schemas
- Store friend relationships in user_friend and backfill default friend links at startup
- Auto-add the default user as a friend for newly created accounts
- Support target user_id in /api profile requests and return target profile data
- Make profile accessory_info optional to avoid zero-value accessory payloads
- Update login topInfo friend counters from friend relationship state

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-05 01:54:59 +08:00
YumeMichi fa2efe4298 webui: Make some user preferences configurable
This extends 09f0237560.

- Extend user_pref with configurable profile fields and automatic migration defaults
- Move user info responses to read from user_pref instead of hardcoded values
- Add admin profile page for editing UI values after login

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 19:31:27 +08:00
YumeMichi e61c07a9a3 Reduce handler request boilerplate
- Add session.Attach to reuse per-request sessions across middleware and ghome handlers
- Make Session finalize/abort paths idempotent to avoid duplicate commit or rollback work
- Move request_data parsing helper to internal/utils
- Expand ParseRequestData usage across api, download, unit, live, multiunit, and subscenario handlers
- Extract download package metadata into internal/handler/download/types.go
- Return explicit errors from selected session lookup helpers and update callers
- Make api action handlers return errors directly instead of calling ss.CheckErr in nested layers

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 03:05:32 +08:00
YumeMichi 9b367594ba Drop redundant internal utils
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-03 23:22:33 +08:00
YumeMichi 150ce674ad Implement more endpoints & overhaul [2/n]
Drop LevelDB and move all the things to SQLite.

Implemented endpoints:
/api <unit, accessoryMaterialAll>
/api <unit, accessoryTab>
/live/continue
/live/partyList
/unit/favoriteAccessory (WIP)
/unit/sale

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-28 11:44:56 +08:00
YumeMichi c77241a883 Overhaul [1/n]
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-01-29 02:42:28 +08:00