fix: cdr record
This commit is contained in:
@@ -80,14 +80,11 @@
|
||||
c.client_name,
|
||||
c.client_mac,
|
||||
c.client_device_type,
|
||||
min( ch.start_time ) start_time,
|
||||
max( ch.end_time ) end_time,
|
||||
sum(
|
||||
ifnull( ch.duration, 0 )) duration,
|
||||
sum(
|
||||
ifnull( ch.traffic_down, 0 )) traffic_down,
|
||||
sum(
|
||||
ifnull( ch.traffic_up, 0 )) traffic_up
|
||||
ch.start_time,
|
||||
ch.end_time,
|
||||
ifnull( ch.duration, 0 ) duration,
|
||||
ifnull( ch.traffic_down, 0 ) traffic_down,
|
||||
ifnull( ch.traffic_up, 0 ) traffic_up
|
||||
FROM
|
||||
u_cdr cdr
|
||||
LEFT JOIN u_cdr_history ch ON cdr.id = ch.cdr_id
|
||||
@@ -100,10 +97,7 @@
|
||||
<if test="userId != null and userId != ''">
|
||||
AND cdr.user_id = #{userId}
|
||||
</if>
|
||||
GROUP BY
|
||||
cdr.user_id,
|
||||
cdr.client_id
|
||||
ORDER BY
|
||||
min( ch.start_time ) DESC
|
||||
ch.start_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -31,11 +31,14 @@
|
||||
c.client_name,
|
||||
c.client_mac,
|
||||
c.client_device_type,
|
||||
ch.start_time,
|
||||
ch.end_time,
|
||||
ifnull( ch.duration, 0 ) duration,
|
||||
ifnull( ch.traffic_down, 0 ) traffic_down,
|
||||
ifnull( ch.traffic_up, 0 ) traffic_up
|
||||
min( ch.start_time ) start_time,
|
||||
max( ch.end_time ) end_time,
|
||||
sum(
|
||||
ifnull( ch.duration, 0 )) duration,
|
||||
sum(
|
||||
ifnull( ch.traffic_down, 0 )) traffic_down,
|
||||
sum(
|
||||
ifnull( ch.traffic_up, 0 )) traffic_up
|
||||
FROM
|
||||
u_cdr cdr
|
||||
LEFT JOIN u_cdr_history ch ON cdr.id = ch.cdr_id
|
||||
@@ -48,8 +51,11 @@
|
||||
<if test="userId != null and userId != ''">
|
||||
AND cdr.user_id = #{userId}
|
||||
</if>
|
||||
GROUP BY
|
||||
cdr.user_id,
|
||||
cdr.client_id
|
||||
ORDER BY
|
||||
ch.start_time DESC
|
||||
min( ch.start_time ) DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user