Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
antai-sport-http-server
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
antai-sport
antai-sport-http-server
Commits
8be2313f
Commit
8be2313f
authored
Sep 09, 2022
by
liming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
清空前期临时数据接口
parent
fc155140
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
0 additions
and
1326 deletions
+0
-1326
antai-sport.ndm2
doc/antai-sport.ndm2
+0
-956
TrainRecordController.java
...siness/train/record/controller/TrainRecordController.java
+0
-33
ReqTrainRecord.java
.../mobile/api/business/train/record/dto/ReqTrainRecord.java
+0
-35
TrainRecordService.java
...api/business/train/record/service/TrainRecordService.java
+0
-56
TrainBicycleRecord.java
...tp/server/repository/train/entity/TrainBicycleRecord.java
+0
-102
TrainRunRecord.java
...t/http/server/repository/train/entity/TrainRunRecord.java
+0
-102
TrainBicycleRecordMapper.java
...ver/repository/train/mapper/TrainBicycleRecordMapper.java
+0
-16
TrainRunRecordMapper.java
.../server/repository/train/mapper/TrainRunRecordMapper.java
+0
-16
TrainBicycleRecordMapper.xml
.../main/resources/mapper/train/TrainBicycleRecordMapper.xml
+0
-5
TrainRunRecordMapper.xml
.../src/main/resources/mapper/train/TrainRunRecordMapper.xml
+0
-5
No files found.
doc/antai-sport.ndm2
View file @
8be2313f
...
@@ -1885,930 +1885,6 @@
...
@@ -1885,930 +1885,6 @@
"triggers": [],
"triggers": [],
"tablePartitions": []
"tablePartitions": []
},
},
{
"objectType": "Table_MYSQL",
"name": "train_bicycle_record",
"comment": "骑行训练运动记录",
"engine": "InnoDB",
"characterSet": "utf8mb4",
"collation": "utf8mb4_0900_ai_ci",
"autoIncrement": 714,
"tablespace": "",
"storage": "",
"insertMethod": "",
"connection": "",
"checksum": false,
"rowFormat": "DYNAMIC",
"avgRowLength": 0,
"maxRows": 0,
"minRows": 0,
"keyBlockSize": 0,
"packKeys": "",
"delayKeyWrite": false,
"dataDirectory": "",
"indexDirectory": "",
"statsAutoRecalc": "",
"statsPersistent": "",
"statsSamplePages": 0,
"union": "",
"pageCheckSum": false,
"transactional": false,
"compression": "",
"oldName": "train_bicycle_record",
"encryption": false,
"createOptions": "row_format=DYNAMIC",
"createTime": "2021-09-26 09:19:13",
"checkTime": "",
"dataFree": 0,
"dataLength": 114688,
"indexLength": 0,
"maxDataLength": 0,
"rows": 713,
"updateTime": "2022-01-25 11:38:29",
"DDL": "CREATE TABLE `train_bicycle_record` (\n `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',\n `type` int DEFAULT NULL COMMENT '训练类型 1.漫游骑行 2.课程训练',\n `user_id` bigint DEFAULT NULL COMMENT '用户id',\n `start_time` datetime DEFAULT NULL COMMENT '开始时间',\n `end_time` datetime DEFAULT NULL COMMENT '结束时间',\n `duration` int DEFAULT NULL COMMENT '骑行时长(秒)',\n `climb_distance` decimal(18,2) DEFAULT NULL COMMENT '爬坡距离',\n `distance` decimal(18,2) DEFAULT NULL COMMENT '骑行总长度',\n `avg_ftp` decimal(18,2) DEFAULT NULL COMMENT '平均功率',\n `avg_speed` decimal(18,2) DEFAULT NULL COMMENT '平均速度',\n `version` bigint DEFAULT '0' COMMENT '版本号',\n `deleted` tinyint DEFAULT '0' COMMENT '删除标记',\n `ct_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',\n `lm_user_id` bigint DEFAULT NULL COMMENT '修改人id',\n `lm_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',\n PRIMARY KEY (`id`) USING BTREE\n) ENGINE=InnoDB AUTO_INCREMENT=714 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='骑行训练运动记录'",
"partitionBy": "",
"partitionByExpr": "",
"partitions": 0,
"partitionKeyAlgorithm": "",
"subPartitionBy": "",
"subPartitionByExpr": "",
"subPartitions": 0,
"subPartitionKeyAlgorithm": "",
"fields": [
{
"objectType": "TableField_MYSQL",
"name": "id",
"type": "bigint",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": false,
"defaultType": "Others",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": true,
"comment": "主键",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "id"
},
{
"objectType": "TableField_MYSQL",
"name": "type",
"type": "int",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "训练类型 1.漫游骑行 2.课程训练",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "type"
},
{
"objectType": "TableField_MYSQL",
"name": "user_id",
"type": "bigint",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "用户id",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "user_id"
},
{
"objectType": "TableField_MYSQL",
"name": "start_time",
"type": "datetime",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "开始时间",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "start_time"
},
{
"objectType": "TableField_MYSQL",
"name": "end_time",
"type": "datetime",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "结束时间",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "end_time"
},
{
"objectType": "TableField_MYSQL",
"name": "duration",
"type": "int",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "骑行时长(秒)",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "duration"
},
{
"objectType": "TableField_MYSQL",
"name": "climb_distance",
"type": "decimal",
"length": 18,
"decimals": 2,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "爬坡距离",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "climb_distance"
},
{
"objectType": "TableField_MYSQL",
"name": "distance",
"type": "decimal",
"length": 18,
"decimals": 2,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "骑行总长度",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "distance"
},
{
"objectType": "TableField_MYSQL",
"name": "avg_ftp",
"type": "decimal",
"length": 18,
"decimals": 2,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "平均功率",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "avg_ftp"
},
{
"objectType": "TableField_MYSQL",
"name": "avg_speed",
"type": "decimal",
"length": 18,
"decimals": 2,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "平均速度",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "avg_speed"
},
{
"objectType": "TableField_MYSQL",
"name": "version",
"type": "bigint",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Others",
"defaultValue": "0",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "版本号",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "version"
},
{
"objectType": "TableField_MYSQL",
"name": "deleted",
"type": "tinyint",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Others",
"defaultValue": "0",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "删除标记",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "deleted"
},
{
"objectType": "TableField_MYSQL",
"name": "ct_date",
"type": "datetime",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Others",
"defaultValue": "CURRENT_TIMESTAMP",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "创建时间",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "ct_date"
},
{
"objectType": "TableField_MYSQL",
"name": "lm_user_id",
"type": "bigint",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "修改人id",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "lm_user_id"
},
{
"objectType": "TableField_MYSQL",
"name": "lm_date",
"type": "datetime",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Others",
"defaultValue": "CURRENT_TIMESTAMP",
"isOnUpdateCurrentTimestamp": true,
"isAutoInc": false,
"comment": "修改时间",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "lm_date"
}
],
"indexes": [],
"primaryKey": {
"objectType": "PrimaryKey_MYSQL",
"name": "",
"fields": [
{
"objectType": "IndexField_MYSQL",
"name": "id",
"keyLength": 0,
"order": "",
"oldName": "id"
}
],
"oldName": "",
"indexMethod": "BTREE",
"comment": ""
},
"foreignKeys": [],
"triggers": [],
"tablePartitions": []
},
{
"objectType": "Table_MYSQL",
"name": "train_run_record",
"comment": "跑步训练运动记录",
"engine": "InnoDB",
"characterSet": "utf8mb4",
"collation": "utf8mb4_0900_ai_ci",
"autoIncrement": 14,
"tablespace": "",
"storage": "",
"insertMethod": "",
"connection": "",
"checksum": false,
"rowFormat": "DYNAMIC",
"avgRowLength": 0,
"maxRows": 0,
"minRows": 0,
"keyBlockSize": 0,
"packKeys": "",
"delayKeyWrite": false,
"dataDirectory": "",
"indexDirectory": "",
"statsAutoRecalc": "",
"statsPersistent": "",
"statsSamplePages": 0,
"union": "",
"pageCheckSum": false,
"transactional": false,
"compression": "",
"oldName": "train_run_record",
"encryption": false,
"createOptions": "row_format=DYNAMIC",
"createTime": "2021-09-26 10:02:16",
"checkTime": "",
"dataFree": 0,
"dataLength": 16384,
"indexLength": 0,
"maxDataLength": 0,
"rows": 13,
"updateTime": "2021-12-25 10:32:40",
"DDL": "CREATE TABLE `train_run_record` (\n `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',\n `type` int DEFAULT NULL COMMENT '训练类型 1.漫游骑行 2.课程训练',\n `user_id` bigint DEFAULT NULL COMMENT '用户id',\n `start_time` datetime DEFAULT NULL COMMENT '开始时间',\n `end_time` datetime DEFAULT NULL COMMENT '结束时间',\n `duration` int DEFAULT NULL COMMENT '骑行时长(秒)',\n `climb_distance` decimal(18,2) DEFAULT NULL COMMENT '爬坡距离',\n `distance` decimal(18,2) DEFAULT NULL COMMENT '骑行总长度',\n `avg_speed` decimal(18,2) DEFAULT NULL COMMENT '平均速度',\n `pace` varchar(18) DEFAULT NULL COMMENT '配速',\n `version` bigint DEFAULT '0' COMMENT '版本号',\n `deleted` tinyint DEFAULT '0' COMMENT '删除标记',\n `ct_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',\n `lm_user_id` bigint DEFAULT NULL COMMENT '修改人id',\n `lm_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',\n PRIMARY KEY (`id`) USING BTREE\n) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='跑步训练运动记录'",
"partitionBy": "",
"partitionByExpr": "",
"partitions": 0,
"partitionKeyAlgorithm": "",
"subPartitionBy": "",
"subPartitionByExpr": "",
"subPartitions": 0,
"subPartitionKeyAlgorithm": "",
"fields": [
{
"objectType": "TableField_MYSQL",
"name": "id",
"type": "bigint",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": false,
"defaultType": "Others",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": true,
"comment": "主键",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "id"
},
{
"objectType": "TableField_MYSQL",
"name": "type",
"type": "int",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "训练类型 1.漫游骑行 2.课程训练",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "type"
},
{
"objectType": "TableField_MYSQL",
"name": "user_id",
"type": "bigint",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "用户id",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "user_id"
},
{
"objectType": "TableField_MYSQL",
"name": "start_time",
"type": "datetime",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "开始时间",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "start_time"
},
{
"objectType": "TableField_MYSQL",
"name": "end_time",
"type": "datetime",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "结束时间",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "end_time"
},
{
"objectType": "TableField_MYSQL",
"name": "duration",
"type": "int",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "骑行时长(秒)",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "duration"
},
{
"objectType": "TableField_MYSQL",
"name": "climb_distance",
"type": "decimal",
"length": 18,
"decimals": 2,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "爬坡距离",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "climb_distance"
},
{
"objectType": "TableField_MYSQL",
"name": "distance",
"type": "decimal",
"length": 18,
"decimals": 2,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "骑行总长度",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "distance"
},
{
"objectType": "TableField_MYSQL",
"name": "avg_speed",
"type": "decimal",
"length": 18,
"decimals": 2,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "平均速度",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "avg_speed"
},
{
"objectType": "TableField_MYSQL",
"name": "pace",
"type": "varchar",
"length": 18,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "utf8mb4",
"collation": "utf8mb4_0900_ai_ci",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "配速",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "pace"
},
{
"objectType": "TableField_MYSQL",
"name": "version",
"type": "bigint",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Others",
"defaultValue": "0",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "版本号",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "version"
},
{
"objectType": "TableField_MYSQL",
"name": "deleted",
"type": "tinyint",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Others",
"defaultValue": "0",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "删除标记",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "deleted"
},
{
"objectType": "TableField_MYSQL",
"name": "ct_date",
"type": "datetime",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Others",
"defaultValue": "CURRENT_TIMESTAMP",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "创建时间",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "ct_date"
},
{
"objectType": "TableField_MYSQL",
"name": "lm_user_id",
"type": "bigint",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Null",
"defaultValue": "",
"isOnUpdateCurrentTimestamp": false,
"isAutoInc": false,
"comment": "修改人id",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "lm_user_id"
},
{
"objectType": "TableField_MYSQL",
"name": "lm_date",
"type": "datetime",
"length": -2147483648,
"decimals": -2147483648,
"isUnsigned": false,
"isZeroFill": false,
"setEnumValues": "",
"isBinary": false,
"charset": "",
"collation": "",
"isNullable": true,
"defaultType": "Others",
"defaultValue": "CURRENT_TIMESTAMP",
"isOnUpdateCurrentTimestamp": true,
"isAutoInc": false,
"comment": "修改时间",
"columnFormat": "",
"storage": "",
"isVirtual": false,
"isGeneratedAlways": false,
"virtualExpr": "",
"virtualType": "",
"oldName": "lm_date"
}
],
"indexes": [],
"primaryKey": {
"objectType": "PrimaryKey_MYSQL",
"name": "",
"fields": [
{
"objectType": "IndexField_MYSQL",
"name": "id",
"keyLength": 0,
"order": "",
"oldName": "id"
}
],
"oldName": "",
"indexMethod": "BTREE",
"comment": ""
},
"foreignKeys": [],
"triggers": [],
"tablePartitions": []
},
{
{
"objectType": "Table_MYSQL",
"objectType": "Table_MYSQL",
"name": "sport_user_friend_request",
"name": "sport_user_friend_request",
...
@@ -23148,38 +22224,6 @@
...
@@ -23148,38 +22224,6 @@
"a": 1
"a": 1
}
}
},
},
{
"type": "table",
"schemaName": "antaisport",
"tableName": "train_bicycle_record",
"x": 2473,
"y": 1271,
"width": 150,
"height": 366,
"isBold": false,
"titleColor": {
"r": 55,
"g": 131,
"b": 192,
"a": 1
}
},
{
"type": "table",
"schemaName": "antaisport",
"tableName": "train_run_record",
"x": 2640,
"y": 1277,
"width": 206,
"height": 366,
"isBold": false,
"titleColor": {
"r": 55,
"g": 131,
"b": 192,
"a": 1
}
},
{
{
"type": "table",
"type": "table",
"schemaName": "antaisport",
"schemaName": "antaisport",
...
...
mobile-api/src/main/java/com/antai/sport/http/server/mobile/api/business/train/record/controller/TrainRecordController.java
deleted
100644 → 0
View file @
fc155140
package
com
.
antai
.
sport
.
http
.
server
.
mobile
.
api
.
business
.
train
.
record
.
controller
;
import
com.antai.sport.http.server.mobile.api.business.train.record.service.TrainRecordService
;
import
com.antai.sport.http.server.common.annotation.LoginSportUser
;
import
com.antai.sport.http.server.common.base.Result
;
import
com.antai.sport.http.server.mobile.api.business.train.record.dto.ReqTrainRecord
;
import
com.antai.sport.http.server.repository.sport.entity.SportUser
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
static
com
.
antai
.
sport
.
http
.
server
.
common
.
util
.
ResultUtil
.
success
;
@RestController
@RequestMapping
(
"/train/record"
)
@Api
(
tags
=
{
"训练相关接口"
})
public
class
TrainRecordController
{
@Resource
private
TrainRecordService
trainRecordService
;
@PostMapping
()
@ApiOperation
(
value
=
"训练数据记录接口"
)
public
ResponseEntity
<
Result
>
saveRecord
(
@LoginSportUser
SportUser
loginUser
,
@RequestBody
ReqTrainRecord
data
)
{
trainRecordService
.
saveRecord
(
loginUser
,
data
);
return
success
();
}
}
mobile-api/src/main/java/com/antai/sport/http/server/mobile/api/business/train/record/dto/ReqTrainRecord.java
deleted
100644 → 0
View file @
fc155140
package
com
.
antai
.
sport
.
http
.
server
.
mobile
.
api
.
business
.
train
.
record
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
@Data
@ApiModel
(
"训练记录"
)
public
class
ReqTrainRecord
{
@ApiModelProperty
(
"运动类型: 1.骑行 2.跑步"
)
private
Integer
sportType
;
@ApiModelProperty
(
"开始时间 yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
startTime
;
@ApiModelProperty
(
"结束时间 yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
endTime
;
@ApiModelProperty
(
"骑行时长(秒)"
)
private
Integer
duration
;
@ApiModelProperty
(
"爬坡距离"
)
private
BigDecimal
climbDistance
;
@ApiModelProperty
(
"骑行总长度"
)
private
BigDecimal
distance
;
@ApiModelProperty
(
"平均功率 运动类型位骑行时赋值"
)
private
BigDecimal
avgFtp
;
@ApiModelProperty
(
"平均速度"
)
private
BigDecimal
avgSpeed
;
@ApiModelProperty
(
"配速 运动类型为跑步的时候赋值"
)
private
BigDecimal
pace
;
}
mobile-api/src/main/java/com/antai/sport/http/server/mobile/api/business/train/record/service/TrainRecordService.java
deleted
100644 → 0
View file @
fc155140
package
com
.
antai
.
sport
.
http
.
server
.
mobile
.
api
.
business
.
train
.
record
.
service
;
import
com.antai.sport.http.server.constants.SportType
;
import
com.antai.sport.http.server.mobile.api.business.sport.user.SportUserSummaryService
;
import
com.antai.sport.http.server.mobile.api.business.train.record.dto.ReqTrainRecord
;
import
com.antai.sport.http.server.repository.sport.entity.SportUser
;
import
com.antai.sport.http.server.repository.train.entity.TrainBicycleRecord
;
import
com.antai.sport.http.server.repository.train.entity.TrainRunRecord
;
import
com.antai.sport.http.server.repository.train.mapper.TrainBicycleRecordMapper
;
import
com.antai.sport.http.server.repository.train.mapper.TrainRunRecordMapper
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
@Service
public
class
TrainRecordService
{
@Resource
private
SportUserSummaryService
sportUserSummaryService
;
@Resource
private
TrainBicycleRecordMapper
trainBicycleRecordMapper
;
@Resource
private
TrainRunRecordMapper
trainRunRecordMapper
;
@Transactional
public
void
saveRecord
(
SportUser
loginUser
,
ReqTrainRecord
data
)
{
if
(
data
.
getSportType
().
equals
(
SportType
.
BICYCLE
))
{
TrainBicycleRecord
record
=
new
TrainBicycleRecord
();
record
.
setUserId
(
loginUser
.
getId
());
record
.
setStartTime
(
data
.
getStartTime
());
record
.
setEndTime
(
data
.
getEndTime
());
record
.
setDuration
(
data
.
getDuration
());
record
.
setClimbDistance
(
data
.
getClimbDistance
());
record
.
setDistance
(
data
.
getDistance
());
record
.
setAvgFtp
(
data
.
getAvgFtp
());
record
.
setAvgSpeed
(
data
.
getAvgSpeed
());
trainBicycleRecordMapper
.
insert
(
record
);
}
else
{
TrainRunRecord
record
=
new
TrainRunRecord
();
record
.
setUserId
(
loginUser
.
getId
());
record
.
setStartTime
(
data
.
getStartTime
());
record
.
setEndTime
(
data
.
getEndTime
());
record
.
setDuration
(
data
.
getDuration
());
record
.
setClimbDistance
(
data
.
getClimbDistance
());
record
.
setDistance
(
data
.
getDistance
());
record
.
setAvgSpeed
(
data
.
getAvgSpeed
());
record
.
setPace
(
data
.
getPace
());
trainRunRecordMapper
.
insert
(
record
);
}
//汇总数据
sportUserSummaryService
.
summary
(
loginUser
.
getId
(),
data
.
getSportType
(),
data
.
getDistance
(),
data
.
getClimbDistance
(),
data
.
getDuration
());
}
}
repository/src/main/java/com/antai/sport/http/server/repository/train/entity/TrainBicycleRecord.java
deleted
100644 → 0
View file @
fc155140
package
com
.
antai
.
sport
.
http
.
server
.
repository
.
train
.
entity
;
import
java.math.BigDecimal
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 骑行训练运动记录
* </p>
*
* @author liming
* @since 2021-09-26
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
TrainBicycleRecord
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 训练类型 1.漫游骑行 2.课程训练
*/
private
Integer
type
;
/**
* 用户id
*/
private
Long
userId
;
/**
* 开始时间
*/
private
LocalDateTime
startTime
;
/**
* 结束时间
*/
private
LocalDateTime
endTime
;
/**
* 骑行时长(秒)
*/
private
Integer
duration
;
/**
* 爬坡距离
*/
private
BigDecimal
climbDistance
;
/**
* 骑行总长度
*/
private
BigDecimal
distance
;
/**
* 平均功率
*/
private
BigDecimal
avgFtp
;
/**
* 平均速度
*/
private
BigDecimal
avgSpeed
;
/**
* 版本号
*/
private
Long
version
;
/**
* 删除标记
*/
private
Integer
deleted
;
/**
* 创建时间
*/
private
LocalDateTime
ctDate
;
/**
* 修改人id
*/
private
Long
lmUserId
;
/**
* 修改时间
*/
private
LocalDateTime
lmDate
;
}
repository/src/main/java/com/antai/sport/http/server/repository/train/entity/TrainRunRecord.java
deleted
100644 → 0
View file @
fc155140
package
com
.
antai
.
sport
.
http
.
server
.
repository
.
train
.
entity
;
import
java.math.BigDecimal
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 跑步训练运动记录
* </p>
*
* @author liming
* @since 2021-09-26
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
TrainRunRecord
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 训练类型 1.漫游骑行 2.课程训练
*/
private
Integer
type
;
/**
* 用户id
*/
private
Long
userId
;
/**
* 开始时间
*/
private
LocalDateTime
startTime
;
/**
* 结束时间
*/
private
LocalDateTime
endTime
;
/**
* 骑行时长(秒)
*/
private
Integer
duration
;
/**
* 爬坡距离
*/
private
BigDecimal
climbDistance
;
/**
* 骑行总长度
*/
private
BigDecimal
distance
;
/**
* 平均速度
*/
private
BigDecimal
avgSpeed
;
/**
* 配速
*/
private
BigDecimal
pace
;
/**
* 版本号
*/
private
Long
version
;
/**
* 删除标记
*/
private
Integer
deleted
;
/**
* 创建时间
*/
private
LocalDateTime
ctDate
;
/**
* 修改人id
*/
private
Long
lmUserId
;
/**
* 修改时间
*/
private
LocalDateTime
lmDate
;
}
repository/src/main/java/com/antai/sport/http/server/repository/train/mapper/TrainBicycleRecordMapper.java
deleted
100644 → 0
View file @
fc155140
package
com
.
antai
.
sport
.
http
.
server
.
repository
.
train
.
mapper
;
import
com.antai.sport.http.server.repository.train.entity.TrainBicycleRecord
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* 骑行训练运动记录 Mapper 接口
* </p>
*
* @author liming
* @since 2021-09-26
*/
public
interface
TrainBicycleRecordMapper
extends
BaseMapper
<
TrainBicycleRecord
>
{
}
repository/src/main/java/com/antai/sport/http/server/repository/train/mapper/TrainRunRecordMapper.java
deleted
100644 → 0
View file @
fc155140
package
com
.
antai
.
sport
.
http
.
server
.
repository
.
train
.
mapper
;
import
com.antai.sport.http.server.repository.train.entity.TrainRunRecord
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* 跑步训练运动记录 Mapper 接口
* </p>
*
* @author liming
* @since 2021-09-26
*/
public
interface
TrainRunRecordMapper
extends
BaseMapper
<
TrainRunRecord
>
{
}
repository/src/main/resources/mapper/train/TrainBicycleRecordMapper.xml
deleted
100644 → 0
View file @
fc155140
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.antai.sport.http.server.repository.train.mapper.TrainBicycleRecordMapper"
>
</mapper>
repository/src/main/resources/mapper/train/TrainRunRecordMapper.xml
deleted
100644 → 0
View file @
fc155140
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.antai.sport.http.server.repository.train.mapper.TrainRunRecordMapper"
>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment