Commit 2230072a authored by zhangqingle's avatar zhangqingle

修改接口、添加新接口

parent 73cb6993
...@@ -39,7 +39,7 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> { ...@@ -39,7 +39,7 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
// 退出课程 // 退出课程
@Update("update b_lesson_person set flag = 0 where business_id = #{id}") @Update("update b_lesson_person set del_flag = 1 where business_id = #{id}")
int quit(String id); int quit(String id);
//查询线上课程学员追踪图表 //查询线上课程学员追踪图表
...@@ -232,4 +232,9 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> { ...@@ -232,4 +232,9 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
" #{param.isAppoint}) " + " #{param.isAppoint}) " +
"</script>") "</script>")
int insertBLessonPerson(@Param("param") BLessonPerson param); int insertBLessonPerson(@Param("param") BLessonPerson param);
@Select("<script>select * from b_lesson_person where 1=1 " +
"and business_id = #{businessId}</script>")
@ResultMap(value = "BaseResultMap")
BLessonPerson selectById(String businessId);
} }
...@@ -45,7 +45,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService { ...@@ -45,7 +45,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
@Transactional(propagation = Propagation.REQUIRED, readOnly = false) @Transactional(propagation = Propagation.REQUIRED, readOnly = false)
@Override @Override
public PersistModel quit(QuitLessonDTO quitLessonDTO) { public PersistModel quit(QuitLessonDTO quitLessonDTO) {
BLessonPerson bLessonPerson = bLessonPersonRepository.selectByPrimaryKey(quitLessonDTO.getBusinessId()); BLessonPerson bLessonPerson = bLessonPersonRepository.selectById(quitLessonDTO.getBusinessId());
if ("1".equals(bLessonPerson.getIsAppoint())){ if ("1".equals(bLessonPerson.getIsAppoint())){
throw new ServiceException(ResultExceptionEnum.APPOINT_NOT_CLOSE); throw new ServiceException(ResultExceptionEnum.APPOINT_NOT_CLOSE);
} }
......
...@@ -358,15 +358,15 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -358,15 +358,15 @@ public class BLessonServiceImpl implements BLessonService {
@Transactional(propagation = Propagation.REQUIRED,readOnly = false) @Transactional(propagation = Propagation.REQUIRED,readOnly = false)
public List<FindLessonRecommendRspDTO> queryRecommendByLessonId(FindLessonRecommendDTO param) { public List<FindLessonRecommendRspDTO> queryRecommendByLessonId(FindLessonRecommendDTO param) {
//按部门名模糊查询部门id(list)------ //按部门名模糊查询部门id(list)------
if (StringUtils.isEmpty(param.getViewParam())){ // if (StringUtils.isEmpty(param.getViewParam())){
param.setViewParam(""); // param.setViewParam("");
} // }
List<DeptGetRspDTO> departs = cotactApiRequestClient.deptListDeptInfoByName(param.getCorpId(),param.getViewParam()); List<DeptGetRspDTO> departs = cotactApiRequestClient.deptListDeptInfoByName(param.getCorpId(),param.getViewParam());
//查询结果放入DTO中 //查询结果放入DTO中
param.setDeparts(departs); param.setDeparts(departs);
//查询该课程推荐的所有人 //查询该课程推荐的所有人
List<FindLessonRecommendRspDTO> findLessonPersonRecommend = bRecommendRepository.queryRecommendPersonByLessonId(param); List<FindLessonRecommendRspDTO> findLessonPersonRecommend = bRecommendRepository.queryRecommendPersonByLessonId(param);
//查询该课程推荐的所有部门
List<FindLessonRecommendRspDTO> findLessonDepartRecommend = bRecommendRepository.queryRecommendDepartByLessonId(param); List<FindLessonRecommendRspDTO> findLessonDepartRecommend = bRecommendRepository.queryRecommendDepartByLessonId(param);
if (departs != null && departs.size() > 0 && findLessonDepartRecommend != null && findLessonDepartRecommend.size() > 0){ if (departs != null && departs.size() > 0 && findLessonDepartRecommend != null && findLessonDepartRecommend.size() > 0){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment