|
|
@@ -1,6 +1,7 @@
|
|
|
package com.xjrsoft.module.internship.service.impl;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
|
import com.xjrsoft.module.internship.dto.AddInternshipPlanTeacherDto;
|
|
|
@@ -12,10 +13,14 @@ import com.xjrsoft.module.internship.mapper.InternshipPlanClassMapper;
|
|
|
import com.xjrsoft.module.internship.mapper.InternshipPlanTeacherMapper;
|
|
|
import com.xjrsoft.module.internship.service.IInternshipPlanTeacherService;
|
|
|
import com.xjrsoft.module.internship.vo.InternshipPlanTeacherPageVo;
|
|
|
+import com.xjrsoft.module.internship.vo.InternshipPlanTeacherVo;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
/**
|
|
|
* @title: 实习计划带队老师表
|
|
|
* @Author dzx
|
|
|
@@ -66,4 +71,21 @@ public class InternshipPlanTeacherServiceImpl extends MPJBaseServiceImpl<Interns
|
|
|
|
|
|
return true;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public InternshipPlanTeacherVo getInfoById(Long id) {
|
|
|
+ InternshipPlanTeacher planTeacher = this.getById(id);
|
|
|
+
|
|
|
+ List<InternshipPlanClass> classList = internshipPlanClassMapper.selectList(
|
|
|
+ new QueryWrapper<InternshipPlanClass>().lambda()
|
|
|
+ .eq(InternshipPlanClass::getInternshipPlanTeacherId, id)
|
|
|
+ );
|
|
|
+ InternshipPlanTeacherVo result = BeanUtil.toBean(planTeacher, InternshipPlanTeacherVo.class);
|
|
|
+
|
|
|
+ result.setClassIds(classList.stream().map(InternshipPlanClass::getClassId).collect(Collectors.toList()));
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|