Commit 1fc580d5 authored by luzhuang's avatar luzhuang

fix: lable

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