Commit cebee36d authored by root's avatar root

修改接口、添加新接口

parent 20106f99
...@@ -164,7 +164,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -164,7 +164,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>)" + " <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>)" +
" </if> " + " </if> " +
" or (bl.business_id not in (select lesson_id from b_viewrange where del_flag != 1 and flag = 1 AND lesson_id IS NOT NULL ))) " + " or (bl.business_id not in (select lesson_id from b_viewrange where del_flag != 1 and flag = 1 AND lesson_id IS NOT NULL ))) " +
" and bl.person_number > (select `value` from b_dictionary where type = 'ZXRS') " + //ZXRS 在学人数 " and bl.person_number > (select `value` from b_dictionary where type = 'ZXRS') + 0 " + //ZXRS 在学人数
" order by bl.person_number,bl.release_date desc " + " order by bl.person_number,bl.release_date desc " +
"</script>") "</script>")
@ResultMap(value = "BaseResultMap") @ResultMap(value = "BaseResultMap")
...@@ -252,7 +252,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -252,7 +252,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>)" + " <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item} </foreach>)" +
" </if> " + " </if> " +
" or (bl.business_id not in (select lesson_id from b_viewrange where del_flag != 1 and flag = 1 AND lesson_id IS NOT NULL ))) " + " or (bl.business_id not in (select lesson_id from b_viewrange where del_flag != 1 and flag = 1 AND lesson_id IS NOT NULL ))) " +
" and bl.person_number > (select `value` from b_dictionary where type = 'GZRS') " + //ZXRS 关注人数 " and bl.person_number > (select `value` from b_dictionary where type = 'GZRS') + 0 " + //ZXRS 关注人数
" order by bl.collect_number,bl.release_date desc " + " order by bl.collect_number,bl.release_date desc " +
"</script>") "</script>")
@ResultMap(value = "BaseResultMap") @ResultMap(value = "BaseResultMap")
...@@ -365,7 +365,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -365,7 +365,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" and bl.release_state = 2 " + " and bl.release_state = 2 " +
" and ((bvs.type = 0 and bvs.target_id = #{param.userId}) " + " and ((bvs.type = 0 and bvs.target_id = #{param.userId}) " +
" or (bl.lecturer_id = #{curUser.userId}) " + " or (bl.lecturer_id = #{param.userId}) " +
" <if test=\"param.departs != null and param.departs.size() > 0 \"> " + " <if test=\"param.departs != null and param.departs.size() > 0 \"> " +
" or (bvs.type = 1 and bvs.target_id in " + " or (bvs.type = 1 and bvs.target_id in " +
" <foreach item='item' index='index' collection='param.departs' open='(' separator=',' close=')'> #{item} </foreach>)" + " <foreach item='item' index='index' collection='param.departs' open='(' separator=',' close=')'> #{item} </foreach>)" +
...@@ -618,9 +618,6 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -618,9 +618,6 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" <if test= \" model.courseIds !=null and model.courseIds.size() > 0 \">and course_id in " + " <if test= \" model.courseIds !=null and model.courseIds.size() > 0 \">and course_id in " +
" <foreach item='item' index='index' collection='model.courseIds' open='(' separator=',' close=')'> #{item} </foreach> " + " <foreach item='item' index='index' collection='model.courseIds' open='(' separator=',' close=')'> #{item} </foreach> " +
" </if> " + " </if> " +
// " <if test=\"model.releaseDateSort !=null and model.releaseDateSort !='' and model.releaseDateSort =='0'.toString()\"> ORDER BY bl.release_date DESC </if> "+
// " <if test=\"model.releaseDateSort !=null and model.releaseDateSort !='' and model.releaseDateSort =='1'.toString()\"> ORDER BY bl.release_date ASC "+
// " </if> "+
" order by br.update_date " + " order by br.update_date " +
"</script>") "</script>")
@ResultMap(value = "BaseResultMap") @ResultMap(value = "BaseResultMap")
...@@ -667,15 +664,12 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -667,15 +664,12 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" <foreach item='item' index='index' collection='model.departs' open='(' separator=',' close=')'> #{item} </foreach>)" + " <foreach item='item' index='index' collection='model.departs' open='(' separator=',' close=')'> #{item} </foreach>)" +
" </if> " + " </if> " +
" or (bl.business_id not in (select lesson_id from b_viewrange where del_flag != 1 and flag = 1 AND lesson_id IS NOT NULL ))) " + " or (bl.business_id not in (select lesson_id from b_viewrange where del_flag != 1 and flag = 1 AND lesson_id IS NOT NULL ))) " +
" and bl.person_number > (select `value` from b_dictionary where type = 'ZXRS') " + //ZXRS 在学人数 " and bl.person_number > (select `value` from b_dictionary where type = 'ZXRS') + 0 " + //ZXRS 在学人数
" <if test= \" model.viewParam !=null and model.viewParam != ''\">and (bl.lesson_name like CONCAT('%',#{model.viewParam},'%') " + " <if test= \" model.viewParam !=null and model.viewParam != ''\">and (bl.lesson_name like CONCAT('%',#{model.viewParam},'%') " +
" or su.name like CONCAT('%',#{model.viewParam},'%'))</if> " + " or su.name like CONCAT('%',#{model.viewParam},'%'))</if> " +
" <if test= \" model.courseIds !=null and model.courseIds.size() > 0 \">and course_id in " + " <if test= \" model.courseIds !=null and model.courseIds.size() > 0 \">and course_id in " +
" <foreach item='item' index='index' collection='model.courseIds' open='(' separator=',' close=')'> #{item} </foreach> " + " <foreach item='item' index='index' collection='model.courseIds' open='(' separator=',' close=')'> #{item} </foreach> " +
" </if> " + " </if> " +
// " <if test=\"model.releaseDateSort !=null and model.releaseDateSort !='' and model.releaseDateSort =='0'.toString()\"> ORDER BY bl.release_date DESC </if> "+
// " <if test=\"model.releaseDateSort !=null and model.releaseDateSort !='' and model.releaseDateSort =='1'.toString()\"> ORDER BY bl.release_date ASC "+
// " </if> "+
" order by bl.person_number,bl.release_date desc " + " order by bl.person_number,bl.release_date desc " +
"</script>") "</script>")
@ResultMap(value = "BaseResultMap") @ResultMap(value = "BaseResultMap")
...@@ -721,15 +715,12 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -721,15 +715,12 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" <foreach item='item' index='index' collection='model.departs' open='(' separator=',' close=')'> #{item} </foreach>)" + " <foreach item='item' index='index' collection='model.departs' open='(' separator=',' close=')'> #{item} </foreach>)" +
" </if> " + " </if> " +
" or (bl.business_id not in (select lesson_id from b_viewrange where del_flag != 1 and flag = 1 AND lesson_id IS NOT NULL ))) " + " or (bl.business_id not in (select lesson_id from b_viewrange where del_flag != 1 and flag = 1 AND lesson_id IS NOT NULL ))) " +
" and bl.person_number > (select `value` from b_dictionary where type = 'GZRS') " + //ZXRS 关注人数 " and bl.person_number > (select `value` from b_dictionary where type = 'GZRS') + 0 " + //ZXRS 关注人数
" <if test= \" model.viewParam !=null and model.viewParam != ''\">and (bl.lesson_name like CONCAT('%',#{model.viewParam},'%') " + " <if test= \" model.viewParam !=null and model.viewParam != ''\">and (bl.lesson_name like CONCAT('%',#{model.viewParam},'%') " +
" or su.name like CONCAT('%',#{model.viewParam},'%'))</if> " + " or su.name like CONCAT('%',#{model.viewParam},'%'))</if> " +
" <if test= \" model.courseIds !=null and model.courseIds.size() > 0 \">and course_id in " + " <if test= \" model.courseIds !=null and model.courseIds.size() > 0 \">and course_id in " +
" <foreach item='item' index='index' collection='model.courseIds' open='(' separator=',' close=')'> #{item} </foreach> " + " <foreach item='item' index='index' collection='model.courseIds' open='(' separator=',' close=')'> #{item} </foreach> " +
" </if> " + " </if> " +
// " <if test=\"model.releaseDateSort !=null and model.releaseDateSort !='' and model.releaseDateSort =='0'.toString()\"> ORDER BY bl.release_date DESC </if> "+
// " <if test=\"model.releaseDateSort !=null and model.releaseDateSort !='' and model.releaseDateSort =='1'.toString()\"> ORDER BY bl.release_date ASC "+
// " </if> "+
" order by bl.collect_number,bl.release_date desc " + " order by bl.collect_number,bl.release_date desc " +
"</script>") "</script>")
@ResultMap(value = "BaseResultMap") @ResultMap(value = "BaseResultMap")
...@@ -799,9 +790,6 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -799,9 +790,6 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" <if test= \" model.courseIds !=null and model.courseIds.size() > 0 \">and course_id in " + " <if test= \" model.courseIds !=null and model.courseIds.size() > 0 \">and course_id in " +
" <foreach item='item' index='index' collection='model.courseIds' open='(' separator=',' close=')'> #{item} </foreach> " + " <foreach item='item' index='index' collection='model.courseIds' open='(' separator=',' close=')'> #{item} </foreach> " +
" </if> " + " </if> " +
// " <if test=\"model.releaseDateSort !=null and model.releaseDateSort !='' and model.releaseDateSort =='0'.toString()\"> ORDER BY bl.release_date DESC </if> "+
// " <if test=\"model.releaseDateSort !=null and model.releaseDateSort !='' and model.releaseDateSort =='1'.toString()\"> ORDER BY bl.release_date ASC "+
// " </if> "+
" order by T.bsum , b.collect_number desc" + " order by T.bsum , b.collect_number desc" +
"</script>") "</script>")
@ResultMap(value = "BaseResultMap") @ResultMap(value = "BaseResultMap")
......
...@@ -112,7 +112,9 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -112,7 +112,9 @@ public class BLessonServiceImpl implements BLessonService {
@Override @Override
@Transactional(propagation = Propagation.REQUIRED,readOnly = false) @Transactional(propagation = Propagation.REQUIRED,readOnly = false)
public List<BLesson> queryPersonMoreByPagination(PageUtil pageUtil, CurUser curUser) { public List<BLesson> queryPersonMoreByPagination(PageUtil pageUtil, CurUser curUser) {
//---------获取部门id------------
List<String> departs = getDeparts(); List<String> departs = getDeparts();
//------------------------------
return bLessonRepository.queryPersonMore(curUser,departs); return bLessonRepository.queryPersonMore(curUser,departs);
} }
...@@ -138,14 +140,18 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -138,14 +140,18 @@ public class BLessonServiceImpl implements BLessonService {
@Override @Override
@Transactional(propagation = Propagation.REQUIRED,readOnly = false) @Transactional(propagation = Propagation.REQUIRED,readOnly = false)
public List<BLesson> queryConcernByPagination(PageUtil pageUtil,CurUser curUser) { public List<BLesson> queryConcernByPagination(PageUtil pageUtil,CurUser curUser) {
//---------获取部门id------------
List<String> departs = getDeparts(); List<String> departs = getDeparts();
//------------------------------
return bLessonRepository.queryConcern(curUser,departs); return bLessonRepository.queryConcern(curUser,departs);
} }
@Override @Override
@Transactional(propagation = Propagation.REQUIRED,readOnly = false) @Transactional(propagation = Propagation.REQUIRED,readOnly = false)
public List<BLesson> queryInterestedByPagination(PageUtil pageUtil,CurUser curUser) { public List<BLesson> queryInterestedByPagination(PageUtil pageUtil,CurUser curUser) {
//---------获取部门id------------
List<String> departs = getDeparts(); List<String> departs = getDeparts();
//------------------------------
return bLessonRepository.queryInterested(curUser,departs); return bLessonRepository.queryInterested(curUser,departs);
} }
...@@ -350,7 +356,7 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -350,7 +356,7 @@ public class BLessonServiceImpl implements BLessonService {
@Override @Override
@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)------
List<LessonRecommendDepartDTO> departs = new ArrayList<>(); List<LessonRecommendDepartDTO> departs = new ArrayList<>();
departs.add(new LessonRecommendDepartDTO("1","111")); departs.add(new LessonRecommendDepartDTO("1","111"));
...@@ -385,8 +391,10 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -385,8 +391,10 @@ public class BLessonServiceImpl implements BLessonService {
} }
//按课程查询指派表是否为空 //按课程查询指派表是否为空
List<BAppoint> bAppoints = bAppointRepository.selectByLessonId(appointLessonDTO); List<BAppoint> bAppoints = bAppointRepository.selectByLessonId(appointLessonDTO);
//将指派人截取翻入List中 //将指派人截取放入List中
List<String> userIds = asList(StringUtils.split(appointLessonDTO.getAppointPerson(), ",")); List<String> userIds = new ArrayList<>();
List<String> userIdList = asList(StringUtils.split(appointLessonDTO.getAppointPerson(), ","));
userIds.addAll(userIdList);
BAppoint bAppoint; BAppoint bAppoint;
if (bAppoints == null || bAppoints.size() == 0){ if (bAppoints == null || bAppoints.size() == 0){
//插入指派表 //插入指派表
...@@ -464,7 +472,9 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -464,7 +472,9 @@ public class BLessonServiceImpl implements BLessonService {
@Override @Override
@Transactional(propagation = Propagation.REQUIRED,readOnly = false) @Transactional(propagation = Propagation.REQUIRED,readOnly = false)
public List<BLesson> queryListAllLessonByPagination(PageUtil pageUtil, FindListLessonDTO model, List<AllCourseDTO> allCourse) { public List<BLesson> queryListAllLessonByPagination(PageUtil pageUtil, FindListLessonDTO model, List<AllCourseDTO> allCourse) {
//---------获取部门------------
List<String> departs = getDeparts(); List<String> departs = getDeparts();
//----------------------------
model.setDeparts(departs); model.setDeparts(departs);
List<String> courseIds; List<String> courseIds;
if (allCourse != null){ if (allCourse != null){
......
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