0
0

设备所属分组

This commit is contained in:
2025-10-11 09:04:48 +08:00
parent 7b8c626cb6
commit 04a21567aa
3 changed files with 11 additions and 4 deletions

View File

@ -17,10 +17,7 @@ import org.springframework.stereotype.Component;
import java.nio.charset.Charset;
import java.time.Duration;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import static com.fuyuanshen.common.core.constant.GlobalConstants.FUNCTION_ACCESS_KEY;
import static com.fuyuanshen.common.core.constant.GlobalConstants.GLOBAL_REDIS_KEY;
@ -42,6 +39,12 @@ public class XinghanSendMsgRule implements MqttMessageRule {
@Override
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;
}