|
|
@@ -135,7 +135,14 @@
|
|
|
AND match_method = #{matchMethod}
|
|
|
</if>
|
|
|
<if test="crowdPackage != null and crowdPackage != ''">
|
|
|
- AND crowd_segment = #{crowdPackage}
|
|
|
+ <choose>
|
|
|
+ <when test='crowdPackage == "泛人群"'>
|
|
|
+ AND (crowd_segment IS NULL OR crowd_segment = '' OR crowd_segment = '-' OR crowd_segment = 'null')
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ AND crowd_segment = #{crowdPackage}
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
</if>
|
|
|
<if test="excludeSelfTitle">
|
|
|
AND (title IS NULL OR demand_content_title IS NULL OR title <> demand_content_title)
|
|
|
@@ -145,14 +152,21 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectDistinctCrowdPackages" resultType="java.lang.String">
|
|
|
- SELECT DISTINCT crowd_segment
|
|
|
+ SELECT DISTINCT
|
|
|
+ CASE
|
|
|
+ WHEN crowd_segment IS NULL
|
|
|
+ OR crowd_segment = ''
|
|
|
+ OR crowd_segment = '-'
|
|
|
+ OR crowd_segment = 'null'
|
|
|
+ THEN '泛人群'
|
|
|
+ ELSE crowd_segment
|
|
|
+ END AS cp
|
|
|
FROM content_platform_demand_video
|
|
|
WHERE dt = #{dt} AND status = 1
|
|
|
- AND crowd_segment IS NOT NULL AND crowd_segment <> '' AND crowd_segment <> '-'
|
|
|
<if test="channelName != null and channelName != ''">
|
|
|
AND channel_name = #{channelName}
|
|
|
</if>
|
|
|
- ORDER BY crowd_segment
|
|
|
+ ORDER BY cp
|
|
|
</select>
|
|
|
|
|
|
<select id="selectActiveVideos" resultType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformDemandVideo">
|