Commit 6282adb4 authored by root's avatar root

Merge branch 'meiteng' of ssh://103.249.252.28:10022/lcy/education into meiteng

parents f04e9bbf 3b1fff7a
......@@ -444,14 +444,20 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
"IFNULL(CONCAT(b3.c_name,\".\"),\"\"), " +
"IFNULL(CONCAT(b2.c_name,\".\"),\"\"), " +
" IFNULL(b1.c_name,\"\") " +
") AS courseName " +
") AS courseName ," +
"u1.name AS createByName " +
"FROM " +
"b_lesson les " +
"LEFT JOIN b_course b1 ON b1.business_id = les.course_id " +
"AND b1.corp_id = #{corpId} " +
"LEFT JOIN b_course b2 ON b2.business_id = b1.pid " +
"AND b2.corp_id = #{corpId} " +
"LEFT JOIN b_course b3 ON b3.business_id = b2.pid " +
"AND b3.corp_id = #{corpId} " +
"LEFT JOIN s_user u1 ON u1.business_id = les.lecturer_id " +
"WHERE 1 = 1 " +
"AND u1.corp_id = #{corpId}" +
"WHERE 1=1 " +
"AND les.corp_id = #{corpId}" +
"<if test='!isAdmin'>" +
"AND les.lecturer_id IN" +
"<foreach item='item' index='index' collection='CurUserSet' open='(' close=')' separator=','> " +
......@@ -463,7 +469,8 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
"<if test=\"bLesson.releaseState!=null and bLesson.releaseState!=''\">AND les.release_state = #{bLesson.releaseState} </if>" +
" order by les.release_date desc </script>")
@ResultMap(value = "BaseResultMap")
List<BLesson> selectAllManageLesson(@Param("CurUserSet") Set<CurUser> CurUserSet, @Param("bLesson") BLesson bLesson, @Param("isAdmin") boolean isAdmin);
List<BLesson> selectAllManageLesson(@Param("C" +
"urUserSet") Set<CurUser> CurUserSet, @Param("bLesson") BLesson bLesson, @Param("isAdmin") boolean isAdmin, @Param("corpId") String corpId) ;
}
......@@ -313,6 +313,8 @@ public class BLessonServiceImpl implements BLessonService {
@Override
public List<BLesson> theLessonMangageByPagination(PageUtil pageUtil, CurUser curUser, BLesson bLesson) {
//查询当前登录人所在的企业
String corpId = curUser.getCorpId();
String userId = curUser.getUserId();
//查询当前登录人有什么角色
List<String> roleList = sysUserMapper.queryRoleTypeByUserId(userId);
......@@ -330,7 +332,7 @@ public class BLessonServiceImpl implements BLessonService {
//自己
uids.add(curUser);
//查讯课程的语句
List<BLesson> bLessons = bLessonRepository.selectAllManageLesson(uids,bLesson, isAdmin);
List<BLesson> bLessons = bLessonRepository.selectAllManageLesson(uids,bLesson, isAdmin,corpId);
return bLessons;
}
}
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