forked from dyf/fys-Multi-tenant
Merge remote-tracking branch 'upstream/6170' into 6170
This commit is contained in:
@ -105,6 +105,7 @@ public class DeviceQueryCriteria extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 设备所属分组
|
||||
* group_id
|
||||
*/
|
||||
private Long groupId;
|
||||
|
||||
|
||||
@ -140,6 +140,9 @@
|
||||
<if test="criteria.deviceStatus != null">
|
||||
and d.device_status = #{criteria.deviceStatus}
|
||||
</if>
|
||||
<if test="criteria.groupId != null">
|
||||
and d.group_id = #{criteria.groupId}
|
||||
</if>
|
||||
<if test="criteria.currentOwnerId != null">
|
||||
and d.current_owner_id = #{criteria.currentOwnerId}
|
||||
</if>
|
||||
@ -475,7 +478,7 @@
|
||||
d.type_name AS deviceName,
|
||||
COUNT(*) AS frequency
|
||||
FROM device_log dl
|
||||
LEFT JOIN device d ON dl.device_id = d.id
|
||||
INNER JOIN device d ON dl.device_id = d.id
|
||||
WHERE dl.create_time >= DATE_SUB(NOW(), INTERVAL #{days} DAY)
|
||||
GROUP BY d.device_type, d.type_name
|
||||
ORDER BY frequency DESC
|
||||
|
||||
Reference in New Issue
Block a user