|
@@ -715,6 +715,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
+ <!-- 快手 同公司所有下级运营人员 -->
|
|
|
+ <select id="getKuaiShouAllOperators" resultType="java.lang.String">
|
|
|
+ SELECT DISTINCT
|
|
|
+ d.user_id
|
|
|
+ FROM
|
|
|
+ application.kuaishou_account_report_daily_dw d
|
|
|
+ WHERE
|
|
|
+ d.charge > 0
|
|
|
+ <if test="startDate != null and startDate != '' ">
|
|
|
+ and d.stat_date >= #{startDate}
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null and endDate != '' ">
|
|
|
+ and d.stat_date <= #{endDate}
|
|
|
+ </if>
|
|
|
+ AND d.user_id in
|
|
|
+ <foreach collection="userIds" item="item" separator=","
|
|
|
+ open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -727,7 +750,8 @@
|
|
|
from `jeecg-boot`.sys_user a
|
|
|
left join `jeecg-boot`.sys_user_role b on a.id = b.user_id
|
|
|
left join `jeecg-boot`.sys_role c on b.role_id = c.id
|
|
|
- where a.id = #{userId}
|
|
|
+ where
|
|
|
+ a.id = #{userId}
|
|
|
LIMIT 1
|
|
|
</select>
|
|
|
|
|
@@ -754,10 +778,15 @@
|
|
|
SELECT DISTINCT
|
|
|
u.id
|
|
|
FROM
|
|
|
- sys_user u,
|
|
|
- user_company c
|
|
|
+ `jeecg-boot`.sys_user u,
|
|
|
+ `jeecg-boot`.user_company c,
|
|
|
+ `jeecg-boot`.sys_user_role r,
|
|
|
+ `jeecg-boot`.sys_role sr
|
|
|
WHERE
|
|
|
u.id = c.user_id
|
|
|
+ and c.user_id = r.user_id
|
|
|
+ and r.role_id = sr.id
|
|
|
+ AND sr.role_name LIKE '%运营%'
|
|
|
<if test="leaderId != null and leaderId != '' ">
|
|
|
AND u.leader_id = #{leaderId}
|
|
|
</if>
|
|
@@ -772,10 +801,15 @@
|
|
|
SELECT DISTINCT
|
|
|
u.id
|
|
|
FROM
|
|
|
- sys_user u,
|
|
|
- user_company c
|
|
|
+ `jeecg-boot`.sys_user u,
|
|
|
+ `jeecg-boot`.user_company c,
|
|
|
+ `jeecg-boot`.sys_user_role r,
|
|
|
+ `jeecg-boot`.sys_role sr
|
|
|
WHERE
|
|
|
u.id = c.user_id
|
|
|
+ and c.user_id = r.user_id
|
|
|
+ and r.role_id = sr.id
|
|
|
+ AND sr.role_name LIKE '%运营%'
|
|
|
AND u.STATUS = 1
|
|
|
AND u.del_flag = 0
|
|
|
<if test="companyId != null and companyId != '' ">
|