文章目录
前言
第一次做一个关于团队的合作项目——禅道,肯定做的不是那么顺利,但是根据流程走还是可以做下来的,后面的冲刺有这次的经验就会相对简单一些。在最开始分配任务的时候,一定要和相关人员讨论好需求,不然会浪费大量时间。在本次冲刺阶段我主要任务是开启关卡学习和查询学科、阶段、关卡功能。
一、开启关卡学习
1.1 开启关卡
功能:通过对未开始的关卡进行学习。在开启的时候要注意修改状态为进行中。
部分代码如下:
@RequestMapping(value = "/startCustomspassStudy")
@ResponseBody
public ResultInfo startStageStudy(
@RequestParam(value = "id") int id,
@RequestParam(value = "start") String start,
@RequestParam(value = "end") String end) throws ParseException {
ResultInfo info=customspassService.startCustomspassStudy(id,start,end);
return info;
}
@Override
public ResultInfo startCustomspassStudy(int id, String _start, String _end) throws ParseException {
ResultInfo info=new ResultInfo();
info.setFlag(true);
//将日期转为java日期
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
Date start1 = sdf.parse(_start);
Date end1 = sdf.parse(_end);
java.sql.Date start = new java.sql.Date(start1.getTime());
java.sql.Date end = new java.sql.Date(end1.getTime());
// System.out.println(email);
try {
//添加关卡学习记录
customspassMapper.startCustomspassStudy(id, start, end);
//根据关卡学习id修改status=3(进行中)
customspassMapper.updateStusyCustomspassStatusById(id);
}catch (Exception e){
info.setFlag(false);
info.setErrorMsg("开启关卡失败");
e