feat(newhosts): 新增最近7天直播场次筛选条件
在主播分页查询中支持按「有无直播记录」过滤。
This commit is contained in:
@@ -148,4 +148,7 @@ public class NewHostsPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "国家英文名", example = "United States")
|
||||
private String countryEng;
|
||||
|
||||
@Schema(description = "最近 7天 是否存在直播场次", example = "0")
|
||||
private Integer hasLiveRecoder;
|
||||
}
|
||||
@@ -107,6 +107,29 @@
|
||||
<if test="req.invitationType != null">
|
||||
and ns.Invitation_type =#{req.invitationType,jdbcType=INTEGER}
|
||||
</if>
|
||||
<!-- 判断主播是否有直播场次 -->
|
||||
<if test="req.hasLiveRecoder != null">
|
||||
<choose>
|
||||
<when test="req.hasLiveRecoder == 0">
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM server_live_host_detail ld
|
||||
WHERE ld.deleted = 0
|
||||
AND ld.tenant_id = ns.tenant_id
|
||||
AND ld.hosts_id = ns.hosts_id
|
||||
)
|
||||
</when>
|
||||
<when test="req.hasLiveRecoder == 1">
|
||||
AND NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM server_live_host_detail ld
|
||||
WHERE ld.deleted = 0
|
||||
AND ld.tenant_id = ns.tenant_id
|
||||
AND ld.hosts_id = ns.hosts_id
|
||||
)
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
<!-- 排序类型 -->
|
||||
group by
|
||||
ns.hosts_id
|
||||
|
||||
Reference in New Issue
Block a user