|
@@ -58,7 +58,7 @@
|
|
|
put_type,
|
|
|
IFNULL(t2.count,0) as 'count'
|
|
|
from kuaishou_live_user_account t1
|
|
|
- left join (
|
|
|
+ left join (
|
|
|
SELECT ks_id as ksId,account_name as accountName, sum(1) as 'count' FROM kuaishou_live_user_account_part
|
|
|
GROUP BY ks_id,account_name
|
|
|
) t2 ON t2.accountName = t1.account_name AND t2.ksId = t1.ks_id
|
|
@@ -99,22 +99,16 @@
|
|
|
where id = #{id}
|
|
|
</select>
|
|
|
|
|
|
- <select id="queryNicknameList" parameterType="com.ruixuan.live.entity.KuaishouLiveUserAccount"
|
|
|
- resultType="com.alibaba.fastjson.JSONObject">
|
|
|
- select
|
|
|
- ks_id as 'ksId',
|
|
|
- ks_name as 'ksName',
|
|
|
- account_id as 'accountId',
|
|
|
- account_name as 'accountName'
|
|
|
+ <select id="queryNicknameList" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
+ select ks_id as 'ksId', ks_name as 'ksName'
|
|
|
from kuaishou_live_user_account
|
|
|
- <where>
|
|
|
- <if test="ksId != null ">and ks_id = #{ksId}</if>
|
|
|
- <if test="ksName != null and ksName != ''">and ks_name like concat('%', #{ksName}, '%')</if>
|
|
|
- <if test="accountId != null ">and account_id = #{accountId}</if>
|
|
|
- <if test="accountName != null and accountName != ''">and account_name like concat('%', #{accountName},
|
|
|
- '%')
|
|
|
- </if>
|
|
|
- </where>
|
|
|
+ GROUP BY ks_id
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="queryAccountListByKsId" parameterType="Long" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
+ select ks_id as 'ksId', ks_name as 'ksName', account_id as 'accountId', account_name as 'accountName'
|
|
|
+ from kuaishou_live_user_account
|
|
|
+ where ks_id = #{ksId}
|
|
|
</select>
|
|
|
|
|
|
|