Commit Graph

70 Commits

Author SHA1 Message Date
nepiedg fd097729d7 feat: 戒烟成就、梦想图标预设、打卡统计与依赖注入调整
- 成就系统、连续打卡天数计算、管理后台成就 CRUD
- 梦想目标图标预设 DreamPreset 与用户端 dream-presets 接口
- 管理后台梦想图标 CRUD;戒烟打卡 summary 修正
- 忽略根目录编译产物 /api

Made-with: Cursor
2026-04-04 14:55:50 +08:00
nepiedg 1c0aeb152a feat(marketing): user profile update, ad placement management, logo limits
- Add PUT /auth/profile endpoint for nickname and avatar updates
- Add ad_placements table and CRUD admin API for managing ad units
- Add GET /marketing/ad-config public API for mini-program to fetch ad config
- Reduce logo limit from 10 to 3 per user, add 2MB file size validation

Made-with: Cursor
2026-04-04 04:02:06 +08:00
nepiedg b4170b4863 feat(marketing): add user logo management module
Users can now save uploaded logos to the backend (marketing_user_logos table),
avoiding repeated uploads. Includes CRUD endpoints: list, save, delete with
a per-user limit of 10 logos.

Made-with: Cursor
2026-04-04 03:46:57 +08:00
nepiedg 1eab1b99c1 feat: rename qiniu to oss, add admin upload proxy with thumbnail, add dev-login
- Rename all QINIU_* config/code/docs to OSS_* to match actual Alibaba Cloud OSS
- Refactor upload module from internal/common/qiniu to internal/common/upload
- Add backend proxy upload endpoint (POST /api/admin/marketing/upload) to avoid CORS
- Auto-generate compressed thumbnail (800px, JPEG 80%) on admin image upload
- Add dev-login endpoint (POST /api/v1/auth/dev-login) for H5 debugging
- Add imageutil package for server-side image resizing

Made-with: Cursor
2026-04-04 02:52:16 +08:00
nepiedg 0f624a5c07 feat(auth): return smoke mode in login response 2026-04-02 00:37:54 +08:00
你çšnepiedg 515fba0b55 feat: update smoke profile area handling 2026-03-19 15:41:26 +08:00
你çšnepiedg 9278260681 feat: add quit-checkin v2 backend APIs 2026-03-17 00:47:33 +08:00
你çšnepiedg 12619aa4ab feat(database): add repairSmokeAIAdviceIndexes function and corresponding tests
- Implemented repairSmokeAIAdviceIndexes to manage the unique index for fa_smoke_ai_advice.
- Added unit tests for the new function to ensure correct index recreation and validation.
- Updated AutoMigrate to include the new index repair function.
2026-03-16 15:35:32 +08:00
root 6b5ce40140 fix(smoke): 修复首页 AI 建议降级与节点索引 2026-03-14 00:22:28 +08:00
root c42492da5f feat(smoke): 增加 AI 今日总结接口与首页缓存透出 2026-03-13 21:29:57 +08:00
hello-dd-code 93bcc6c787 feat(smoke): 添加个性化戒烟计划生成功能 (Issue #46)
- 新增 Model 层: SmokeQuitPlan, SmokeQuitPlanDay 结构体
- 新增 Service 层: GenerateQuitPlan, GetActivePlan, GetPlanDays, ResetPlan
- 新增 Handler 层: POST /generate, GET /, GET /days, POST /reset
- 集成 AI 生成 30 天个性化戒烟减量方案
- 支持重置计划功能
2026-03-13 14:58:42 +08:00
root a46b51cd58 fix: 统一戒烟小程序默认头像为指定OSS地址 2026-03-10 22:50:06 +08:00
root 0cdfebd1dc fix: 分享接口返回小程序路径去除前导斜杠 2026-03-10 20:36:22 +08:00
root 484aa96a6e feat: add smoke share token and read-only share APIs 2026-03-10 18:53:01 +08:00
root a4b466744c feat(admin): add fa_smoke CRUD APIs with Chinese comments (#45) 2026-03-10 17:29:36 +08:00
root 2ddb2403e4 feat(admin): add watermark table list APIs (#44) 2026-03-10 17:02:53 +08:00
root 6f1f75d983 feat(admin): complete settings APIs and password update flow 2026-03-10 16:40:51 +08:00
root 59508efb05 feat: move marketing admin to /api/admin and remove built-in page 2026-03-10 01:14:30 +08:00
root d8623fab8f fix: resolve marketing static page path across working dirs 2026-03-10 00:55:52 +08:00
root 386877da9a feat: 新增admin用户与会员管理接口 2026-03-09 22:44:05 +08:00
root 27617cd373 refactor: expiry 模块按 handler/model/service 分层 2026-03-09 21:13:59 +08:00
root f45940cbc5 refactor: admin 模块按 handler/model/service 分层 2026-03-09 21:13:49 +08:00
root 7591a443d9 feat: 完成后台Issue#9 小程序管理接口模块 2026-03-09 19:26:25 +08:00
root bd1e644ef5 feat: 完成后台Issue#6 数据统计接口模块 2026-03-09 19:26:07 +08:00
root 54cf7ea37f feat: 完成后台Issue#4 管理员认证接口模块 2026-03-09 19:25:44 +08:00
root 9daf5e98ff feat: 完成 #40 营销图后台七牛直传与页面上传能力 2026-03-09 19:17:25 +08:00
root 88d02ed6db test: 完成 #39 营销图路由注册与鉴权接入验证 2026-03-09 19:17:10 +08:00
root efff6eb7d4 feat: 完成 #38 营销图CRUD接口下载校验与测试 2026-03-09 19:17:01 +08:00
nepiedg e14255cf64 feat(upload): 支持阿里云 OSS 直传凭证 + 营销图管理后台静态路由
- 新增 internal/common/oss: OSS PostPolicy/UploadHost,CDN 为 aliyuncs 时返回 OSS 凭证
- upload_handler: QINIU_CDN_DOMAIN 为 OSS 域名时返回 oss_access_key_id/policy/signature,upload_url 为 bucket 域名
- routes: 增加 /admin/marketing 静态页面路由

Made-with: Cursor
2026-03-06 11:25:23 +00:00
nepiedg ac49e1458c feat(marketing): 新增营销图管理模块
- 新增 marketing 模块:model/repository/service/handler 四层架构
- 数据模型:marketing_categories、marketing_templates、marketing_user_downloads
- 小程序端接口:分类列表、模板列表/详情、下载记录、广告回调
- 管理后台接口:分类/模板 CRUD、下载统计(X-Admin-Token 鉴权)
- 路由注册:接入现有 AuthMiddleware,新增 AdminTokenMiddleware
- Web 管理后台:单页面 Vue3 + Element Plus(分类管理、模板管理、数据概览)

Closes #37, #38, #39, #40

Made-with: Cursor
2026-03-06 07:36:05 +00:00
root 3301acf6e6 perf(expiry): 完成 #34 性能优化与缓存 2026-03-04 18:40:45 +08:00
root 6c303abd58 test(expiry): 完成 #31 后端单元测试与覆盖率提升 2026-03-04 18:35:32 +08:00
root cc16b342d7 feat(expiry): 完成 #25 用户设置接口实现 2026-03-04 17:12:36 +08:00
root 6bee50c170 feat(expiry): 完成 #24 物品 Handler 接口实现 2026-03-04 17:11:15 +08:00
root e982cdc773 feat(expiry): 完成 #23 物品 Service 层实现 2026-03-04 17:10:04 +08:00
root e116ec4929 feat(expiry): 完成 #22 物品 Repository 层实现 2026-03-04 17:08:34 +08:00
root 83fbbe7189 feat(expiry): 完成 #21 物品与设置模型实现 2026-03-04 17:07:30 +08:00
root f092019c61 feat(expiry): 完成 #20 模块目录与健康路由 2026-03-04 17:06:26 +08:00
root ff16ea09d2 修复resisted记录被默认值覆盖为1的问题 2026-03-04 01:03:04 +08:00
root bdd34785ef 修复戒烟首页与统计中抽烟/忍住口径混淆 2026-03-04 00:59:12 +08:00
hello-dd-code d64267accc 新增七牛回调接口并接入验签校验 2026-02-28 16:45:19 +08:00
hello-dd-code 37868e6654 增加七牛回调配置与签名验签能力 2026-02-28 16:43:54 +08:00
hello-dd-code 5666dc61a0 落地结构化日志与基础监控告警 2026-02-28 16:37:37 +08:00
hello-dd-code 48f6e9dcad 补充兑换码开通会员集成测试场景 2026-02-28 16:30:34 +08:00
hello-dd-code 01dd0ccbbe 统一会员门禁逻辑并补权限分支测试 2026-02-28 16:27:48 +08:00
hello-dd-code 28690e2477 增强AI个性化画像分层并补回归测试 2026-02-28 16:24:11 +08:00
hello-dd-code c735b791cb 补充AI下次时间接口异常入参与验证记录 2026-02-28 16:24:04 +08:00
hello-dd-code ec9517e248 修复AI时间节点缓存过期与刷新策略 2026-02-28 16:24:00 +08:00
nepiedg 1b8ff310eb Add media proxy feature for resource downloading
- Introduced a new API endpoint `GET /api/v1/video/proxy` to facilitate media resource downloads, allowing users to bypass domain restrictions imposed by WeChat.
- Updated configuration to include proxy settings such as `SHORT_VIDEO_PROXY_ENABLED`, `SHORT_VIDEO_PROXY_ALLOWED_DOMAINS`, `SHORT_VIDEO_PROXY_MAX_SIZE_MB`, and `SHORT_VIDEO_PROXY_TIMEOUT_SECONDS`.
- Enhanced the `ShortVideoConfig` struct to accommodate new proxy-related fields.
- Improved error handling for proxy requests, including checks for allowed domains and file size limits.
- Updated documentation to reflect the new proxy functionality and its configuration options, ensuring clarity for users and developers.
2026-02-06 11:28:02 +00:00
nepiedg 9200600b1c Enhance smoking tracking API with new features and improvements
- Added a new API endpoint `GET /api/v1/smoke/home` to consolidate core modules for the home dashboard, reducing the need for multiple requests.
- Updated the `smoke` routes to include the new home endpoint and improved user profile management with the addition of a `quit_date` field.
- Enhanced the algorithm for calculating daily targets and next smoke suggestions, ensuring accurate future time handling and user-specific recommendations.
- Improved API documentation to reflect new endpoints, response formats, and detailed field descriptions for better clarity and usability.
- Refactored user authentication handling in various handlers to streamline the process and ensure consistent error responses.
2026-01-29 17:16:35 +00:00