Merge remote-tracking branch 'upstream/6170' into 6170
This commit is contained in:
@ -17,10 +17,7 @@ import org.springframework.stereotype.Component;
|
|||||||
|
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import static com.fuyuanshen.common.core.constant.GlobalConstants.FUNCTION_ACCESS_KEY;
|
import static com.fuyuanshen.common.core.constant.GlobalConstants.FUNCTION_ACCESS_KEY;
|
||||||
import static com.fuyuanshen.common.core.constant.GlobalConstants.GLOBAL_REDIS_KEY;
|
import static com.fuyuanshen.common.core.constant.GlobalConstants.GLOBAL_REDIS_KEY;
|
||||||
@ -42,6 +39,12 @@ public class XinghanSendMsgRule implements MqttMessageRule {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getCommandType() {
|
public String getCommandType() {
|
||||||
|
List<Integer> list = Arrays.asList(1, 2, 3, 4, 5);
|
||||||
|
|
||||||
|
// 三种等价的写法
|
||||||
|
Integer[] array1 = list.toArray(new Integer[0]);
|
||||||
|
Integer[] array2 = list.toArray(size -> new Integer[size]);
|
||||||
|
|
||||||
return XingHanCommandTypeConstants.XingHan_ESEND_MSG;
|
return XingHanCommandTypeConstants.XingHan_ESEND_MSG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -105,6 +105,7 @@ public class DeviceQueryCriteria extends BaseEntity {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备所属分组
|
* 设备所属分组
|
||||||
|
* group_id
|
||||||
*/
|
*/
|
||||||
private Long groupId;
|
private Long groupId;
|
||||||
|
|
||||||
|
|||||||
@ -140,6 +140,9 @@
|
|||||||
<if test="criteria.deviceStatus != null">
|
<if test="criteria.deviceStatus != null">
|
||||||
and d.device_status = #{criteria.deviceStatus}
|
and d.device_status = #{criteria.deviceStatus}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="criteria.groupId != null">
|
||||||
|
and d.group_id = #{criteria.groupId}
|
||||||
|
</if>
|
||||||
<if test="criteria.currentOwnerId != null">
|
<if test="criteria.currentOwnerId != null">
|
||||||
and d.current_owner_id = #{criteria.currentOwnerId}
|
and d.current_owner_id = #{criteria.currentOwnerId}
|
||||||
</if>
|
</if>
|
||||||
@ -475,7 +478,7 @@
|
|||||||
d.type_name AS deviceName,
|
d.type_name AS deviceName,
|
||||||
COUNT(*) AS frequency
|
COUNT(*) AS frequency
|
||||||
FROM device_log dl
|
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)
|
WHERE dl.create_time >= DATE_SUB(NOW(), INTERVAL #{days} DAY)
|
||||||
GROUP BY d.device_type, d.type_name
|
GROUP BY d.device_type, d.type_name
|
||||||
ORDER BY frequency DESC
|
ORDER BY frequency DESC
|
||||||
|
|||||||
Reference in New Issue
Block a user