|
@@ -255,16 +255,22 @@
|
|
|
|
|
|
<select id="queryItemsListByAccountId" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
SELECT
|
|
|
- tt2.item_name as 'itemName',
|
|
|
+ tt2.keyword as 'itemName',
|
|
|
tt1.channel_code as 'channelCode',
|
|
|
- tt4.app_name as 'appName'
|
|
|
+ tt3.app_name as 'appName'
|
|
|
FROM
|
|
|
ctop_kuaishou_channel_rel tt1
|
|
|
- INNER JOIN ( SELECT t3.item_name, t1.channel_code FROM ctop_kuaishou_channel t1 INNER JOIN ctop_kuaishou_channel_items_rel t2 ON t1.id = t2.channel_id LEFT JOIN ctop_kuaishou_channel_items t3 ON t2.item_id = t3.id WHERE t1.is_have_item = 1 AND t3.item_name IS NOT NULL ) tt2 ON tt2.channel_code = tt1.channel_code
|
|
|
- INNER JOIN ctop_kuaishou_channel_app_info tt4 ON tt1.app_id = tt4.app_id
|
|
|
+ INNER JOIN (
|
|
|
+ SELECT t3.keyword, t1.channel_code FROM ctop_kuaishou_channel t1
|
|
|
+ INNER JOIN ctop_kuaishou_channel_items_rel t2 ON t1.id = t2.channel_id
|
|
|
+ LEFT JOIN ctop_kuaishou_channel_items t3 ON t2.item_id = t3.id
|
|
|
+ WHERE t1.is_have_item = 1
|
|
|
+ AND t3.state = 1
|
|
|
+ ) tt2 ON tt2.channel_code = tt1.channel_code
|
|
|
+ INNER JOIN ctop_kuaishou_channel_app_info tt3 ON tt1.app_id = tt3.app_id
|
|
|
WHERE
|
|
|
tt1.account_id = #{accountId}
|
|
|
- AND tt4.app_name = #{appName}
|
|
|
+ AND tt3.app_name = #{appName}
|
|
|
GROUP BY
|
|
|
tt2.item_name
|
|
|
</select>
|