|
|
@@ -40,7 +40,7 @@
|
|
|
qw_external_contact AS qec
|
|
|
WHERE
|
|
|
date_format( qec.create_time, '%y%m%d' ) = date_format(now(), '%y%m%d' )
|
|
|
- AND qec.company_user_id = 327
|
|
|
+ AND qec.company_user_id = #{userIds}
|
|
|
),
|
|
|
t2 AS (
|
|
|
SELECT
|
|
|
@@ -50,11 +50,11 @@
|
|
|
WHERE
|
|
|
date_format( qec.create_time, '%y%m%d' ) = date_format(now(), '%y%m%d' )
|
|
|
AND qec.fs_user_id IS NOT NULL
|
|
|
- AND qec.company_user_id = 327
|
|
|
+ AND qec.company_user_id = #{userIds}
|
|
|
),
|
|
|
- t3 AS ( SELECT count(*) AS completeNum FROM fs_course_watch_log AS fcwl WHERE date_format(fcwl.create_time, '%y%m%d' ) = date_format( now(), '%y%m%d') and fcwl.log_type = 2 AND fcwl.company_user_id = 327 ),
|
|
|
- t4 AS ( SELECT count(*) AS answerNum FROM fs_course_answer_logs AS fcal WHERE date_format(fcal.create_time, '%y%m%d' ) = date_format( now(), '%y%m%d') and fcal.company_user_id = 327 ),
|
|
|
- t5 AS ( SELECT count(*) AS redPacketNum FROM fs_course_red_packet_log AS fcrpl WHERE date_format(fcrpl.create_time, '%y%m%d' ) = date_format( now(), '%y%m%d' ) and fcrpl.company_user_id = 327 )
|
|
|
+ t3 AS ( SELECT count(*) AS completeNum FROM fs_course_watch_log AS fcwl WHERE date_format(fcwl.create_time, '%y%m%d' ) = date_format( now(), '%y%m%d') and fcwl.log_type = 2 AND fcwl.company_user_id = #{userIds} ),
|
|
|
+ t4 AS ( SELECT count(*) AS answerNum FROM fs_course_answer_logs AS fcal WHERE date_format(fcal.create_time, '%y%m%d' ) = date_format( now(), '%y%m%d') and fcal.company_user_id = #{userIds} ),
|
|
|
+ t5 AS ( SELECT count(*) AS redPacketNum FROM fs_course_red_packet_log AS fcrpl WHERE date_format(fcrpl.create_time, '%y%m%d' ) = date_format( now(), '%y%m%d' ) and fcrpl.company_user_id = #{userIds} )
|
|
|
SELECT * FROM t1,t2,t3,t4,t5
|
|
|
</select>
|
|
|
|