|
@@ -129,6 +129,9 @@
|
|
|
<sql id="queryCondition">
|
|
|
<where>
|
|
|
smcr.score_data_ is not null and smcr.score_data_ != ''
|
|
|
+ <if test="clientId != null and clientId != ''">
|
|
|
+ and smcr.client_id_ = #{clientId}
|
|
|
+ </if>
|
|
|
<if test="userId!=null">
|
|
|
AND smcr.user_id_=#{userId}
|
|
|
</if>
|
|
@@ -174,7 +177,7 @@
|
|
|
COUNT(DISTINCT DATE(smcr.create_time_)) trainDays,
|
|
|
SUM(smcr.play_time_) trainTime
|
|
|
FROM sys_music_compare_record smcr
|
|
|
- WHERE smcr.user_id_=#{userId} and smcr.client_id_ = 'student'
|
|
|
+ WHERE smcr.user_id_=#{userId} and smcr.client_id_ = #{clientId}
|
|
|
</select>
|
|
|
|
|
|
<select id="getUserTrainChartData" resultType="com.yonge.cooleshow.biz.dal.dto.StudentTrainChartDto">
|
|
@@ -183,7 +186,7 @@
|
|
|
COUNT(DISTINCT smcr.behavior_id_) trainNum,
|
|
|
SUM(smcr.play_time_) trainTime
|
|
|
FROM sys_music_compare_record smcr
|
|
|
- WHERE smcr.user_id_=#{userId} and smcr.client_id_ = 'student'
|
|
|
+ WHERE smcr.user_id_=#{userId} and smcr.client_id_ = #{clientId}
|
|
|
AND DATE_FORMAT(smcr.create_time_, '%Y-%m-%d') BETWEEN #{startTime} AND #{endTime}
|
|
|
GROUP BY DATE_FORMAT(smcr.create_time_, '%Y-%m-%d')
|
|
|
ORDER BY trainDate;
|