|
|
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.google.gson.JsonArray;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.modules.exam.vo.ExamArrangementTimeVo;
|
|
|
+import com.zhongzheng.modules.user.domain.UserPlanCource;
|
|
|
import com.zhongzheng.modules.user.vo.CalendarStudyVo;
|
|
|
import com.zhongzheng.modules.user.vo.CoursePlanVo;
|
|
|
import com.zhongzheng.modules.user.vo.DayStudyVo;
|
|
|
@@ -143,10 +144,18 @@ public class UserPlanServiceImpl extends ServiceImpl<UserPlanMapper, UserPlan> i
|
|
|
}
|
|
|
if (bo.getStatus() == 1) {
|
|
|
boolean save = this.save(userPlan);
|
|
|
+ for (CoursePlanVo coursePlanVo : userPlanVo.getCoursePlanVo()) {
|
|
|
+ coursePlanVo.setPlanId(userPlan.getPlanId());
|
|
|
+ baseMapper.insertSource(coursePlanVo);
|
|
|
+ }
|
|
|
}
|
|
|
if (bo.getStatus() == 2){
|
|
|
userPlan.setPlanId(bo.getPlanId());
|
|
|
boolean save = this.updateById(userPlan);
|
|
|
+ for (CoursePlanVo coursePlanVo : userPlanVo.getCoursePlanVo()) {
|
|
|
+ coursePlanVo.setPlanId(userPlan.getPlanId());
|
|
|
+ baseMapper.insertSource(coursePlanVo);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return userPlanVo;
|
|
|
@@ -175,10 +184,18 @@ public class UserPlanServiceImpl extends ServiceImpl<UserPlanMapper, UserPlan> i
|
|
|
}
|
|
|
if (bo.getStatus() == 1) {
|
|
|
boolean save = this.save(userPlan);
|
|
|
+ for (CoursePlanVo coursePlanVo : userPlanVo.getCoursePlanVo()) {
|
|
|
+ coursePlanVo.setPlanId(userPlan.getPlanId());
|
|
|
+ baseMapper.insertSource(coursePlanVo);
|
|
|
+ }
|
|
|
}
|
|
|
if (bo.getStatus() == 2){
|
|
|
userPlan.setPlanId(bo.getPlanId());
|
|
|
boolean save = this.updateById(userPlan);
|
|
|
+ for (CoursePlanVo coursePlanVo : userPlanVo.getCoursePlanVo()) {
|
|
|
+ coursePlanVo.setPlanId(userPlan.getPlanId());
|
|
|
+ baseMapper.insertSource(coursePlanVo);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return userPlanVo;
|
|
|
@@ -197,6 +214,7 @@ public class UserPlanServiceImpl extends ServiceImpl<UserPlanMapper, UserPlan> i
|
|
|
userPlanVo.setEndTime(userPlan.getEndTime());
|
|
|
userPlanVo.setPitchNum(userPlan.getPitchNum());
|
|
|
userPlanVo.setStudyNum(userPlan.getStudyNum());
|
|
|
+ userPlanVo.setPlanId(userPlan.getPlanId());
|
|
|
|
|
|
List<CalendarStudyVo> calendarStudyVos = JSONObject.parseArray(userPlan.getSchedule(), CalendarStudyVo.class);
|
|
|
List<Long> cont = JSONObject.parseArray(userPlan.getStudyCount(), Long.class);
|
|
|
@@ -205,7 +223,18 @@ public class UserPlanServiceImpl extends ServiceImpl<UserPlanMapper, UserPlan> i
|
|
|
userPlanVo.setCalendarStudyVo(calendarStudyVos);
|
|
|
userPlanVo.setStudyCount(strings);
|
|
|
userPlanVo.setCoursePlanVo(null);
|
|
|
+ List<UserPlanCource> userPlanClsList = baseMapper.selectCourse(userPlan.getPlanId());
|
|
|
|
|
|
+ //初始化需要得到的数组
|
|
|
+ Integer[] array = new Integer[userPlanClsList.size()];
|
|
|
+
|
|
|
+ //使用for循环得到数组
|
|
|
+ for(int i = 0; i < userPlanClsList.size();i++){
|
|
|
+ array[i] = Convert.toInt(userPlanClsList.get(i).getSourceId());
|
|
|
+ }
|
|
|
+ bo.setCourseId(array);
|
|
|
+ List<CoursePlanVo> coursePlanVo = baseMapper.selectByListCourse(bo);
|
|
|
+ userPlanVo.setCoursePlanVo(coursePlanVo);
|
|
|
return userPlanVo;
|
|
|
}
|
|
|
|
|
|
@@ -389,7 +418,9 @@ public class UserPlanServiceImpl extends ServiceImpl<UserPlanMapper, UserPlan> i
|
|
|
userPlanVo1.setUserId(bo.getUserId());
|
|
|
userPlanVo1.setStudyDay(0L);
|
|
|
userPlanVo1.setPitchNum(Convert.toLong(sectionNum)+userPlanVo1.getPitchNum());
|
|
|
- userPlanVo1.setPitchNum(Convert.toLong(sectionNum)+userPlanVo1.getPitchNum());
|
|
|
+ List<CoursePlanVo> coursePlanVo = userPlanVo1.getCoursePlanVo();
|
|
|
+ coursePlanVo.add(planVo);
|
|
|
+ userPlanVo1.setCoursePlanVo(coursePlanVo);
|
|
|
return userPlanVo1;
|
|
|
}
|
|
|
|