|
@@ -446,5 +446,30 @@
|
|
|
AND frozen_time <=#{endDate}
|
|
|
AND t3.media_id = #{mediaId}
|
|
|
GROUP BY t1.user_id
|
|
|
+ UNION
|
|
|
+ SELECT
|
|
|
+ t1.user_id as 'userId',
|
|
|
+ t2.realname,
|
|
|
+ t.role_name as 'roleName',
|
|
|
+ t.role_code as 'roleCode',
|
|
|
+ frozen_time as 'quitTime'
|
|
|
+ FROM `sys_role` t
|
|
|
+ LEFT JOIN sys_user_role t1 ON t.id = t1.role_id
|
|
|
+ LEFT JOIN sys_user t2 ON t1.user_id = t2.id
|
|
|
+ LEFT JOIN ctop_transfer_account t4 ON t1.user_id = t4.transferor
|
|
|
+ LEFT JOIN ctop_user_allocation t3 ON t4.account_id = t3.account_id
|
|
|
+ WHERE t.role_code in
|
|
|
+ <foreach collection="roleCode" item="roleCode" separator="," open="(" close=")">
|
|
|
+ #{roleCode}
|
|
|
+ </foreach>
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
+ AND t1.user_id =#{userId}
|
|
|
+ </if>
|
|
|
+ AND t2.status= 2
|
|
|
+ AND frozen_time >=#{startDate}
|
|
|
+ AND frozen_time <=#{endDate}
|
|
|
+ AND t3.media_id = #{mediaId}
|
|
|
+ GROUP BY t1.user_id
|
|
|
+
|
|
|
</select>
|
|
|
</mapper>
|