浏览代码

Merge remote-tracking branch 'origin/saas' into saas

zouxuan 2 年之前
父节点
当前提交
b0731b9469

+ 3 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseShareServiceImpl.java

@@ -16,6 +16,7 @@ import com.ym.mec.biz.dal.entity.CourseShare;
 import com.ym.mec.biz.dal.entity.Organization;
 import com.ym.mec.biz.dal.entity.Student;
 import com.ym.mec.biz.dal.enums.JoinCourseType;
+import com.ym.mec.biz.dal.enums.StudentMusicGroupStatusEnum;
 import com.ym.mec.biz.dal.page.CourseShareQueryInfo;
 import com.ym.mec.biz.service.CourseShareService;
 import com.ym.mec.biz.service.SysUserService;
@@ -116,6 +117,7 @@ public class CourseShareServiceImpl extends BaseServiceImpl<Integer, CourseShare
         }
         HashMap<String, Object> params = new HashMap<>();
         MapUtil.populateMap(params, courseShareDto);
+        params.put("musicGroupStatusList", Collections.singletonList(StudentMusicGroupStatusEnum.NORMAL.getCode()));
         List<StudentManageListDto> studentList = courseShareDao.selectStudentByParam(params);
         List<Integer> userIdList = studentList.stream()
                 .map(StudentManageListDto::getUserId).distinct().collect(Collectors.toList());
@@ -143,6 +145,7 @@ public class CourseShareServiceImpl extends BaseServiceImpl<Integer, CourseShare
         Map<String, Object> param = new HashMap<>();
         MapUtil.populateMap(param, shareQueryInfo);
         param.put(TENANT_ID, courseSchedule.getTenantId());
+        param.put("musicGroupStatusList", Collections.singletonList(StudentMusicGroupStatusEnum.NORMAL.getCode()));
         Page<StudentManageListDto> pageInfo = PageUtil.getPageInfo(param);
         return PageUtil.pageInfo(courseShareDao.selectStudentByParam(pageInfo, param));
     }

+ 6 - 0
mec-biz/src/main/resources/config/mybatis/CourseShareMapper.xml

@@ -132,6 +132,12 @@
         <if test="param.teamIds != null and param.teamIds.trim() != ''">
             and find_in_set(a.id_ ,#{param.teamIds})
         </if>
+        <if test="param.musicGroupStatusList != null and param.musicGroupStatusList.size() > 0">
+            AND b.music_group_status_ IN
+            <foreach collection="param.musicGroupStatusList" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
         group by b.user_id_) sr on sr.user_id_ = s.user_id_
         <where>
             <if test="param.tenantId != null ">

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/MusicGroupMapper.xml

@@ -338,6 +338,9 @@
             <if test="courseViewType != null">
                 AND mg.course_view_type_ = #{courseViewType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
             </if>
+            <if test="status != null">
+                AND mg.status_ = #{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+            </if>
             <if test="musicGroupIds!=null and musicGroupIds.size()>0">
                 AND mg.id_ IN
                 <foreach collection="musicGroupIds" item="musicGroupId" open="(" close=")" separator=",">