Commit Graph

19 Commits

Author SHA1 Message Date
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 9278260681 feat: add quit-checkin v2 backend APIs 2026-03-17 00:47:33 +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 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 54cf7ea37f feat: 完成后台Issue#4 管理员认证接口模块 2026-03-09 19:25:44 +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 f092019c61 feat(expiry): 完成 #20 模块目录与健康路由 2026-03-04 17:06:26 +08:00
hello-dd-code d64267accc 新增七牛回调接口并接入验签校验 2026-02-28 16:45:19 +08: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
nepiedg 0b26ba6d35 Add lawyer information reporting interface and update routes 2026-01-09 10:37:57 +00:00
nepiedg 49b709df9f Add video download failure reporting feature
- Introduced a new API endpoint `POST /api/v1/video/remove_watermark/report_failure` for reporting download failures.
- Added a new database table `video_download_failures` to store details about failed downloads, including domain, URL, error message, and reporting metadata.
- Updated the video handler to process failure reports and save them to the database.
- Enhanced documentation to include details about the new reporting feature and its usage.
2026-01-03 23:50:30 +00:00
nepiedg 16844d4a42 Enhance AI and Redis integration for smoke logging features
- Added AI configuration options to .env.example and config.go for OpenAI integration.
- Implemented Redis caching for session management in main.go and auth middleware.
- Updated smoke logging service to support real smoking time (`smoke_at`) and AI advice retrieval.
- Enhanced API routes to include endpoints for AI advice and unlock functionality for non-members.
- Improved database schema with new tables for AI advice and unlock records.
- Expanded documentation to cover new AI features and Redis caching implementation.
2026-01-03 02:14:21 +00:00
nepiedg 1c48fbdeaf Integrate WeChat Official Account support and update configuration
- Added WeChat Official Account configuration options to .env.example and config.go for OAuth2 integration.
- Updated main.go to initialize WeChat OAuth handler and register routes for handling OAuth requests.
- Enhanced documentation to include references for WeChat Official Account functionality.
- Updated route registration to accommodate the new OAuth handler for improved API structure.
2025-12-31 03:55:30 +00:00
nepiedg bba6dc6b4f Refactor Qiniu upload integration and remove legacy handlers
- Replaced common upload handler and service with Qiniu-specific implementations in main.go and route registration.
- Deleted outdated upload_handler.go and qiniu_service.go files to streamline the codebase.
- Updated route definitions to utilize the new Qiniu upload handler for improved file upload management.
2025-12-31 03:22:16 +00:00
nepiedg cd7ae5ac56 Integrate Qiniu upload service and update configuration
- Added Qiniu configuration options to .env.example and config.go for file uploads.
- Refactored main.go to include new Qiniu service and upload handler.
- Updated route registration to accommodate the new upload handler.
- Enhanced documentation to include references for Qiniu upload functionality.
- Removed legacy authentication handler and services to streamline the codebase.
2025-12-31 03:18:03 +00:00
nepiedg bbc2f5f1d5 Refactor video handling and integrate new services
- Removed legacy video handling code and models to streamline the codebase.
- Updated main.go to include new services for removing watermarks and smoke logging.
- Enhanced route registration to accommodate new handlers for watermark removal and smoke logging.
- Improved database migration to include new models for watermark processing.
2025-12-31 02:51:38 +00:00
nepiedg d23b253609 Enhance API and error handling for video services
- Updated .gitignore to exclude cache files.
- Refactored main.go to streamline route registration and improve code organization.
- Added detailed comments in auth_handler.go, video_handler.go, and service files for better clarity on request handling and service logic.
- Improved error messages in video_handler.go to provide clearer feedback to users in Chinese.
- Introduced context handling in service methods to manage request timeouts effectively.
2025-12-31 02:30:20 +00:00