【代码优化】IOT: 产品物模型代码评审问题优化

This commit is contained in:
puhui999
2024-12-17 16:53:42 +08:00
parent 91b817a9ec
commit 10da1e095b
37 changed files with 504 additions and 506 deletions

View File

@@ -1,4 +1,4 @@
package cn.iocoder.yudao.module.iot.enums.thingmodel;
package cn.iocoder.yudao.module.iot.enums.thinkmodel;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -10,7 +10,7 @@ import lombok.Getter;
*/
@AllArgsConstructor
@Getter
public enum IotProductThingModelAccessModeEnum {
public enum IotProductThinkModelAccessModeEnum {
READ_ONLY("r"),
READ_WRITE("rw");

View File

@@ -1,4 +1,4 @@
package cn.iocoder.yudao.module.iot.enums.thingmodel;
package cn.iocoder.yudao.module.iot.enums.thinkmodel;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import lombok.AllArgsConstructor;
@@ -14,13 +14,13 @@ import java.util.Arrays;
*/
@AllArgsConstructor
@Getter
public enum IotProductThingModelTypeEnum implements IntArrayValuable {
public enum IotProductThinkModelTypeEnum implements IntArrayValuable {
PROPERTY(1, "属性"),
SERVICE(2, "服务"),
EVENT(3, "事件");
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotProductThingModelTypeEnum::getType).toArray();
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(IotProductThinkModelTypeEnum::getType).toArray();
/**
* 类型
@@ -31,8 +31,8 @@ public enum IotProductThingModelTypeEnum implements IntArrayValuable {
*/
private final String description;
public static IotProductThingModelTypeEnum valueOfType(Integer type) {
for (IotProductThingModelTypeEnum value : values()) {
public static IotProductThinkModelTypeEnum valueOfType(Integer type) {
for (IotProductThinkModelTypeEnum value : values()) {
if (value.getType().equals(type)) {
return value;
}