这是一个基于区块链的跑步打卡的应用,包含后端服务和微信小程序等部分,用于记录跑步成就、投票、获取跑步币等功能。
This project blockchain based running check-in application that includes backend services and a WeChat Mini Program. Its features include recording running achievements, voting, earning running coins, and more.
- 数据访问层(DAO):包含各种 SQL 语句生成器,如 GroupSqlProvider、VoteRecordSqlProvider、UserInfoSqlProvider 等,用于生成插入、更新、删除等 SQL 语句。
- 数据模型(Model):定义了各种数据实体,如 Group、VoteRecord、UserInfo 等,包含实体的属性和对应的 getter/setter 方法。
- 控制器(Controller):处理前端请求,如 FrontController 中的 getUserWeeklyReport 方法,用于获取用户的周报告;LoginController 中的 onLoginV2 方法,用于处理用户登录请求。
- 定时任务(Job):如 TargetFreshJob 类,定义了一个定时任务,每周一 00:00:01 执行,用于刷新目标数据。
- Data Access Layer (DAO): Responsible for generating SQL statements for database operations.
- Data Model (Model): Defines entities and their attributes for representing data in the system.
- Controllers: Handles HTTP requests from the frontend and interacts with the business logic layer.
- Scheduled Jobs (Job): Executes periodic tasks, such as processing daily running results or refreshing weekly targets.
提供用户界面,用于用户进行跑步记录、投票等操作。
Provides the user interface for users to record running achievements, vote, and interact with other features.
目前记录的版本为 v0.1.0,主要功能包括:
- 初始发布跑步币后端服务和微信应用。
- 设置每周跑步目标,范围从 7km 到 25km,且目标可随时更新。
- 记录每次 3km 到 8km 的跑步成就,每天可记录多次。
- 对队友的跑步记录进行点赞或踩,在结果确定前可更改。
- 每天晚上 11:00 执行批处理作业,确定跑步结果。
- 根据投票结果将跑步状态更新为有效或无效。
- 根据跑步结果获得跑步币。
The current recorded version is v0.1.0, with the following main features:
- Initial release of the running coin backend service and WeChat Mini Program.
- Users can set weekly running goals ranging from 7km to 25km, and these goals can be updated at any time.
- Records running achievements between 3km and 8km per session, allowing multiple entries per day.
- Allows users to like or dislike teammates' running records, with the ability to change their votes before finalization.
- Executes batch processing jobs at 11:00 PM daily to confirm running results.
- Updates running statuses based on voting results, marking them as valid or invalid.
- Awards running coins based on the confirmed running results.