|
|
|
@ -47,13 +47,13 @@ |
|
|
|
|
From psdc_statistics_day psd Left Join psdc_device pd On pd.device_id = psd.device_id |
|
|
|
|
<where> |
|
|
|
|
<if test="deviceId != null and deviceId != ''"> |
|
|
|
|
and device_id = #{deviceId} |
|
|
|
|
And psd.device_id = #{deviceId} |
|
|
|
|
</if> |
|
|
|
|
<if test="startTime != null and startTime != ''"><!-- 开始时间检索 --> |
|
|
|
|
AND date_format(day_date,'%Y-%m-%d') >= #{startTime} |
|
|
|
|
And date_format(day_date,'%Y-%m-%d') >= #{startTime} |
|
|
|
|
</if> |
|
|
|
|
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 --> |
|
|
|
|
AND date_format(day_date,'%Y-%m-%d') <= #{endTime} |
|
|
|
|
And date_format(day_date,'%Y-%m-%d') <= #{endTime} |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
</select> |
|
|
|
|