|
@@ -18,6 +18,7 @@
|
|
|
<result column="popularize_type_" jdbcType="VARCHAR" property="popularizeType"/>
|
|
|
<result column="popularize_org_ids_" jdbcType="VARCHAR" property="popularizeOrgIds"/>
|
|
|
<result column="popularize_school_ids_" jdbcType="VARCHAR" property="popularizeSchoolIds"/>
|
|
|
+ <result column="popularize_team_ids_" jdbcType="VARCHAR" property="popularizeTeamIds"/>
|
|
|
<result column="created_by_" jdbcType="INTEGER" property="createdBy"/>
|
|
|
<result column="created_time_" jdbcType="TIMESTAMP" property="createdTime"/>
|
|
|
<result column="updated_by_" jdbcType="INTEGER" property="updatedBy"/>
|
|
@@ -28,14 +29,14 @@
|
|
|
parameterType="com.ym.mec.biz.dal.entity.ImLiveBroadcastRoom">
|
|
|
insert into im_live_broadcast_room(tenant_id_, speaker_id_, room_uid_, room_title_, live_start_time_,
|
|
|
live_end_time_, live_remark_, pre_template_, room_config_, live_state_, room_state_,
|
|
|
- popularize_, popularize_type_,popularize_org_ids_,popularize_school_ids_,
|
|
|
+ popularize_, popularize_type_,popularize_org_ids_,popularize_school_ids_,popularize_team_ids_,
|
|
|
created_by_, created_time_, updated_by_, updated_time_)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
(#{entity.tenantId}, #{entity.speakerId}, #{entity.roomUid}, #{entity.roomTitle}, #{entity.liveStartTime},
|
|
|
#{entity.liveEndTime}, #{entity.liveRemark}, #{entity.preTemplate}, #{entity.roomConfig},
|
|
|
#{entity.liveState}, #{entity.roomState}, #{entity.popularize},
|
|
|
- #{entity.popularizeType},#{entity.popularizeOrgIds},#{entity.popularizeSchoolIds},
|
|
|
+ #{entity.popularizeType},#{entity.popularizeOrgIds},#{entity.popularizeSchoolIds},#{entity.popularizeTeamIds},
|
|
|
#{entity.createdBy}, #{entity.createdTime}, #{entity.updatedBy},#{entity.updatedTime})
|
|
|
</foreach>
|
|
|
</insert>
|
|
@@ -61,7 +62,8 @@
|
|
|
a.popularize_ AS popularize,
|
|
|
a.popularize_type_ AS popularizeType,
|
|
|
a.popularize_org_ids_ AS popularizeOrgIds,
|
|
|
- a.popularize_school_ids_ AS popularizeSchoolIds
|
|
|
+ a.popularize_school_ids_ AS popularizeSchoolIds,
|
|
|
+ a.popularize_team_ids_ AS popularizeTeamIds
|
|
|
from (
|
|
|
select *
|
|
|
from im_live_broadcast_room
|
|
@@ -75,13 +77,20 @@
|
|
|
where popularize_type_ = 'ORGAN'
|
|
|
and INTE_ARRAY(a.popularize_org_ids_, #{param.organIds}) = 1
|
|
|
</if>
|
|
|
- <if test="param.organIds != null">
|
|
|
+ <if test="param.schoolIds != null">
|
|
|
union all
|
|
|
select *
|
|
|
from im_live_broadcast_room as a
|
|
|
where popularize_type_ = 'SCHOOL'
|
|
|
and INTE_ARRAY(a.popularize_school_ids_, #{param.schoolIds}) = 1
|
|
|
</if>
|
|
|
+ <if test="param.teamIds != null">
|
|
|
+ union all
|
|
|
+ select *
|
|
|
+ from im_live_broadcast_room as a
|
|
|
+ where popularize_type_ = 'TEAM'
|
|
|
+ and INTE_ARRAY(a.popularize_team_ids_, #{param.teamIds}) = 1
|
|
|
+ </if>
|
|
|
) as a
|
|
|
left join tenant_info AS t on a.tenant_id_ = t.id_
|
|
|
left join sys_user AS b on a.speaker_id_ = b.id_
|
|
@@ -219,4 +228,10 @@
|
|
|
<select id="querySchoolIds" resultType="string">
|
|
|
select GROUP_CONCAT(id_) from cooperation_organ where find_in_set(organ_id_,#{organIds})
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="queryTeamIds" resultType="string">
|
|
|
+ select group_concat(id_)
|
|
|
+ from music_group where organ_id_ in (#{organIds}) group by organ_id_
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|