Commit Graph

53 Commits

Author SHA1 Message Date
root 3301acf6e6 perf(expiry): 完成 #34 性能优化与缓存 2026-03-04 18:40:45 +08:00
root 3668b10be3 test(expiry): 完成 #32 接口集成测试资产 2026-03-04 18:37:45 +08:00
root 6c303abd58 test(expiry): 完成 #31 后端单元测试与覆盖率提升 2026-03-04 18:35:32 +08:00
root e1b5382004 docs(sql): 完成 #19 过期模块数据库脚本与校验 2026-03-04 18:29:48 +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
hello-dd-code fe9f64f51d docs: add expiry docs and sql script 2026-03-04 16:31:30 +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 4509ebea60 纳入docker-compose配置并忽略本地编译产物 2026-02-28 16:57:00 +08:00
hello-dd-code 3499139060 完善七牛回调验签与重试策略文档 2026-02-28 16:46:03 +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 016c47ba75 新增MySQL备份恢复脚本并完成演练 2026-02-28 16:39:53 +08:00
hello-dd-code 5666dc61a0 落地结构化日志与基础监控告警 2026-02-28 16:37:37 +08:00
hello-dd-code 78f488fbbb 新增生产HTTPS与证书续期告警方案 2026-02-28 16:34:36 +08:00
hello-dd-code c7974e7f40 修复smoke.sql可重入并补迁移回滚验证 2026-02-28 16:32:50 +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
nepiedg 3154365ab2 Add motivation quote feature to smoking tracking API
- Introduced a new database model `SmokeMotivationQuote` for storing motivational quotes.
- Added a new API endpoint `GET /api/v1/smoke/motivation` to retrieve motivation quotes for users.
- Updated the main.go file to include the new model in the auto-migration process.
- Enhanced smoke_routes.go to register the new motivation route with the smoke handler.
2026-01-25 09:53:18 +00:00
nepiedg c9ebfd5873 Update algorithm and API documentation for smoking recovery and motivation features
- Added unified backend calculations for health recovery, savings, and motivation generation in the algorithm documentation.
- Updated API documentation to include new endpoints for retrieving statistics and motivation messages, enhancing clarity on data retrieval processes.
- Revised product documentation to reflect changes in API usage for health recovery and savings calculations, ensuring consistency across all related files.
2026-01-25 09:33:10 +00:00
nepiedg f80c3e8f45 Update algorithm and API documentation for smoking tracking app
- Enhanced the algorithm documentation to clarify the calculation of smoking intervals, including default values and edge cases.
- Updated API documentation to reflect changes in response formats, including the addition of `exceeded_yesterday` and adjustments to time formatting to RFC3339.
- Improved descriptions of user profile management and AI suggestions in the product documentation, ensuring consistency across all related files.
- Removed outdated sequence diagram and UI documentation files to streamline project resources.
2026-01-25 08:51:25 +00:00
nepiedg b67dc32369 Enhance smoking tracking API and documentation
- Updated the main.go file to set the local time zone to Asia/Shanghai.
- Changed API endpoints from `PUT` to `POST` for user profile and logs management in multiple documentation files to reflect the correct usage.
- Added new fields in the API response for home summary, including `last_smoke_at`, `today_count`, `resisted_count`, and `reduced_from_yesterday`.
- Enhanced documentation across various files to accurately describe the updated API endpoints and their expected behaviors.
2026-01-25 07:55:32 +00:00
nepiedg be6d579d41 Update README.md to include product and UI documentation references
- Added new sections in README.md for product documentation (PRD) and UI/UX design documentation, linking to `docs/smoke/PRODUCT.md` and `docs/smoke/UI.md` respectively, to enhance the overall documentation for the project.
2026-01-20 07:34:25 +00:00
nepiedg 53531905d2 Update README.md to include sequence diagram reference for smoking tracking app
- Added a new section in README.md to reference the sequence diagram located in `docs/smoke/SEQUENCE.md`, enhancing documentation for the application's front-end flow.
2026-01-20 07:28:43 +00:00
nepiedg 6cf7eb2294 Enhance smoking tracking features with AI next smoke time suggestions
- Added new API endpoint `GET /api/v1/smoke/next_smoke_time` to provide AI-generated suggestions for the next smoking time based on user data.
- Introduced a new database table `fa_smoke_ai_next_smoke` to store structured AI time node suggestions.
- Updated smoke handler and service to integrate the new AI next smoke time functionality.
- Enhanced documentation to reflect the new API endpoint and its usage, including details on how to generate AI time nodes.
2026-01-20 07:08:52 +00:00
nepiedg dc54c4e934 Add user profile management for smoking data
- Introduced new API endpoints `GET /api/v1/smoke/profile` and `PUT /api/v1/smoke/profile` for retrieving and updating user smoking profiles.
- Added a new database table `fa_smoke_user_profile` to store user-specific smoking data, including daily smoking habits and motivations.
- Updated the smoke handler and service to integrate user profile data into AI advice generation.
- Enhanced documentation to reflect the new user profile features and their usage.
2026-01-20 02:37:20 +00:00
nepiedg 0b26ba6d35 Add lawyer information reporting interface and update routes 2026-01-09 10:37:57 +00:00
nepiedg 0d97946123 Enhance database configuration to support multiple data sources
- Updated .env.example to include optional configuration for additional database instances.
- Refactored DatabaseConfig in config.go to accommodate a default database and additional instances.
- Implemented loadAdditionalDBConfigs function to dynamically load configurations for extra databases.
- Modified InitDB function in database.go to establish connections for both default and additional databases.
- Updated README.md to document the new configuration options for connecting to multiple databases.
2026-01-09 10:32:27 +00:00
nepiedg f1f77a4d3d Add dashboard and latest logs endpoints for smoke tracking
- Introduced a new API endpoint `GET /api/v1/smoke/dashboard` to retrieve a summary of smoking statistics over a specified date range, including today's count and weekly breakdown.
- Added `GET /api/v1/smoke/logs/latest` endpoint to fetch the most recent smoking logs with a configurable limit.
- Updated the smoke handler and service to support the new functionality, including error handling for date parsing and limit validation.
- Enhanced documentation to reflect the new API endpoints and their usage.
2026-01-06 00:17:51 +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 1ad775be63 Enhance database models with comments and table descriptions
- Added comments to various fields in the database models for better clarity and understanding.
- Implemented TableComment methods for several models to provide descriptive information about their purpose.
- Updated the AutoMigrate function to support setting table comments in the database.
- Improved overall documentation within the code to facilitate future maintenance and development.
2026-01-03 02:35:11 +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 2884f54666 Update documentation structure and enhance API descriptions
- Revised README.md to provide a clearer documentation structure for multiple mini programs, including a new table of contents.
- Added references to common authentication documentation in both the remove watermark API and README files.
- Improved clarity of the login interface description and error handling messages in the remove watermark API documentation.
2025-12-31 03:02:00 +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
nepiedg 97cadb033e Add short video configuration and related API endpoints
- Updated .env.example to include SHORT_VIDEO_API_KEY, SHORT_VIDEO_FREE_QUOTA, and SHORT_VIDEO_TIMEOUT_SECONDS.
- Enhanced main.go to auto-migrate new VideoParseLog and VideoParseUnlock models.
- Introduced VideoService and VideoHandler for handling video-related operations.
- Added protected API routes for removing watermarks and unlocking video features.
- Updated config.go to support short video configuration settings.
- Expanded documentation to reflect new features and configuration options.
2025-12-30 00:31:41 +00:00
nepiedg a1eaaab39f Update README.md to include documentation reference for watermark removal mini program 2025-12-29 11:36:54 +00:00