[xingyu.guo] feat: 补充返回内容 1. taskDescription 2. lastLearningStatus
This commit is contained in:
@@ -1,8 +1,5 @@
|
|||||||
package com.guo.learningprogresstracker.dto.response;
|
package com.guo.learningprogresstracker.dto.response;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@@ -54,4 +51,9 @@ public class TaskInfoResponse {
|
|||||||
*/
|
*/
|
||||||
private Double calculatedPriority;
|
private Double calculatedPriority;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上次该任务学习情况
|
||||||
|
*/
|
||||||
|
private String lastLearningStatus;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,13 @@ public class TaskEntity extends BaseEntity implements Serializable {
|
|||||||
@TableField(value = "task_name")
|
@TableField(value = "task_name")
|
||||||
private String taskName;
|
private String taskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务描述
|
||||||
|
*/
|
||||||
|
@TableField(value = "task_description")
|
||||||
|
private String taskDescription;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 学习材料的存储URL
|
* 学习材料的存储URL
|
||||||
*/
|
*/
|
||||||
@@ -74,6 +81,12 @@ public class TaskEntity extends BaseEntity implements Serializable {
|
|||||||
@TableField(value = "calculated_priority")
|
@TableField(value = "calculated_priority")
|
||||||
private Double calculatedPriority;
|
private Double calculatedPriority;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上次该任务学习情况 todo 需要完善枚举
|
||||||
|
*/
|
||||||
|
@TableField(value = "last_learning_status")
|
||||||
|
private String lastLearningStatus;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
}
|
}
|
||||||
@@ -39,13 +39,12 @@ public class TasksServiceImpl extends ServiceImpl<TasksMapper, TaskEntity>
|
|||||||
|
|
||||||
|
|
||||||
private final TasksMapper tasksMapper;
|
private final TasksMapper tasksMapper;
|
||||||
private final TaskConvertImpl taskConvertImpl;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<TaskInfo> taskList(Integer pageNum, Integer pageSize) {
|
public Page<TaskInfo> taskList(Integer pageNum, Integer pageSize) {
|
||||||
Page<TaskEntity> page = tasksMapper.selectPage(new Page<TaskEntity>(pageNum, pageSize), Wrappers.lambdaQuery(TaskEntity.class));
|
Page<TaskEntity> page = tasksMapper.selectPage(new Page<TaskEntity>(pageNum, pageSize), Wrappers.lambdaQuery(TaskEntity.class));
|
||||||
//todo 补充返回内容
|
Page<TaskInfo> response = TaskConvert.MAPPER.toTaskInfoPage(page);
|
||||||
Page<TaskInfo> response = taskConvertImpl.MAPPER.toTaskInfoPage(page);
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
ALTER TABLE tasks
|
||||||
|
ADD task_description text null COMMENT '任务描述' after task_name;
|
||||||
|
|
||||||
|
ALTER TABLE tasks
|
||||||
|
ADD last_learning_status varchar(30) null COMMENT '上次该任务学习情况' after calculated_priority;
|
||||||
Reference in New Issue
Block a user