Compare commits

2 Commits

Author SHA1 Message Date
62af38cbf0 Merge branch 'dyf-device' into 6170 2025-10-11 09:05:38 +08:00
04a21567aa 设备所属分组 2025-10-11 09:04:48 +08:00
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;
}

View File

@ -105,6 +105,7 @@ public class DeviceQueryCriteria extends BaseEntity {
/**
* 设备所属分组
* group_id
*/
private Long groupId;

View File

@ -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>