Commit 1fc580d5 authored by luzhuang's avatar luzhuang

fix: lable

parent 721e186b
...@@ -1220,7 +1220,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -1220,7 +1220,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
"and bl.business_id = #{lessonId} " + "and bl.business_id = #{lessonId} " +
"GROUP BY bl.business_id</script>") "GROUP BY bl.business_id</script>")
@ResultMap(value = "TrainBaseResultMap") @ResultMap(value = "TrainBaseResultMap")
BLesson findOneMyTrain(@Param("curUser") CurUser curUser, @Param("lessonId") String lessonId); List<BLesson> findOneMyTrain(@Param("curUser") CurUser curUser, @Param("lessonId") String lessonId);
@Select("<script>select distinct bl.*," + @Select("<script>select distinct bl.*," +
"CONCAT( " + "CONCAT( " +
...@@ -1242,7 +1242,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> { ...@@ -1242,7 +1242,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
"and bl.business_id = #{lessonId}" + "and bl.business_id = #{lessonId}" +
" </script>") " </script>")
@ResultMap(value = "TrainBaseResultMap") @ResultMap(value = "TrainBaseResultMap")
BLesson findOneMyTeachTrain(@Param("curUser") CurUser curUser, @Param("lessonId") String lessonId); List<BLesson> findOneMyTeachTrain(@Param("curUser") CurUser curUser, @Param("lessonId") String lessonId);
@Select("<script>" + @Select("<script>" +
......
...@@ -177,7 +177,7 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -177,7 +177,7 @@ public class BLessonServiceImpl implements BLessonService {
if (bLessonList == null || bLessonList.size() < 1 || bLessonList.get(0) == null) { if (bLessonList == null || bLessonList.size() < 1 || bLessonList.get(0) == null) {
throw new ServiceException(ResultServiceEnums.NOT_LESSON_ERROR); throw new ServiceException(ResultServiceEnums.NOT_LESSON_ERROR);
} }
BLesson bLesson = bLessonList.get(0); BLesson bLesson =addPushLable(bLessonList,curUser).get(0);
//获取讲师部门 //获取讲师部门
List<String> ids = new ArrayList<>(); List<String> ids = new ArrayList<>();
ids.add(bLesson.getLecturerId()); ids.add(bLesson.getLecturerId());
...@@ -1493,10 +1493,12 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -1493,10 +1493,12 @@ public class BLessonServiceImpl implements BLessonService {
@Override @Override
@Transactional(propagation = Propagation.REQUIRED, readOnly = false) @Transactional(propagation = Propagation.REQUIRED, readOnly = false)
public BLesson findOneMyTrain(CurUser curUser, String lessonId) { public BLesson findOneMyTrain(CurUser curUser, String lessonId) {
BLesson bLesson = bLessonRepository.findOneMyTrain(curUser, lessonId); List<BLesson> bLessons = bLessonRepository.findOneMyTrain(curUser, lessonId);
if (bLesson == null) { if (bLessons == null || bLessons.size() < 1) {
throw new ServiceException(ResultServiceEnums.LESSON_NOT_EXISTA); throw new ServiceException(ResultServiceEnums.LESSON_NOT_EXISTA);
} }
BLesson bLesson = addPushLable(bLessons,curUser).get(0);
//获取讲师部门 //获取讲师部门
List<String> ids = new ArrayList<>(); List<String> ids = new ArrayList<>();
ids.add(bLesson.getLecturerId()); ids.add(bLesson.getLecturerId());
...@@ -1540,11 +1542,11 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -1540,11 +1542,11 @@ public class BLessonServiceImpl implements BLessonService {
@Override @Override
@Transactional(propagation = Propagation.REQUIRED, readOnly = false) @Transactional(propagation = Propagation.REQUIRED, readOnly = false)
public BLesson findOneMyTeachTrain(CurUser curUser, String lessonId) { public BLesson findOneMyTeachTrain(CurUser curUser, String lessonId) {
BLesson bLesson = bLessonRepository.findOneMyTeachTrain(curUser, lessonId); List<BLesson> bLessons = bLessonRepository.findOneMyTeachTrain(curUser, lessonId);
if (bLesson == null) { if (bLessons == null || bLessons.size() < 1) {
throw new ServiceException(ResultServiceEnums.LESSON_NOT_EXISTA); throw new ServiceException(ResultServiceEnums.LESSON_NOT_EXISTA);
} }
BLesson bLesson = addPushLable(bLessons,curUser).get(0);
//获取讲师部门 //获取讲师部门
List<String> ids = new ArrayList<>(); List<String> ids = new ArrayList<>();
ids.add(bLesson.getLecturerId()); ids.add(bLesson.getLecturerId());
......
...@@ -99,10 +99,10 @@ ...@@ -99,10 +99,10 @@
<result column="push_lable" jdbcType="VARCHAR" property="pushLable"/> <result column="push_lable" jdbcType="VARCHAR" property="pushLable"/>
<collection property="labelList" ofType="org.rcisoft.business.blabel.dto.QueryLabelResDTO" <!-- <collection property="labelList" ofType="org.rcisoft.business.blabel.dto.QueryLabelResDTO"-->
javaType="java.util.ArrayList" select="org.rcisoft.business.blesson.dao.BLessonRepository.queryLabelByLessonId" <!-- javaType="java.util.ArrayList" select="org.rcisoft.business.blesson.dao.BLessonRepository.queryLabelByLessonId"-->
column="business_id"> <!-- column="business_id">-->
</collection> <!-- </collection>-->
<collection property="bTrainFileList" ofType="org.rcisoft.business.bfile.entity.BTrainFile" <collection property="bTrainFileList" ofType="org.rcisoft.business.bfile.entity.BTrainFile"
javaType="java.util.ArrayList" select="org.rcisoft.business.bfile.dao.BTrainFileRepository.queryByLessonId" javaType="java.util.ArrayList" select="org.rcisoft.business.bfile.dao.BTrainFileRepository.queryByLessonId"
......
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