【代码修复】IoT:网络组件相关
This commit is contained in:
@@ -107,6 +107,7 @@ public class IotProductScriptController {
|
||||
@PreAuthorize("@ss.hasPermission('iot:product-script:query')")
|
||||
public CommonResult<String> getSampleScript(@RequestParam("type") Integer type) {
|
||||
String sample;
|
||||
// TODO @haohao:要不枚举下?
|
||||
switch (type) {
|
||||
case 1:
|
||||
sample = scriptSamples.getPropertyParserSample();
|
||||
@@ -118,6 +119,7 @@ public class IotProductScriptController {
|
||||
sample = scriptSamples.getCommandEncoderSample();
|
||||
break;
|
||||
default:
|
||||
// TODO @haohao:不支持,返回 error 会不会好点哈?例如说,参数不正确;
|
||||
sample = "// 不支持的脚本类型";
|
||||
}
|
||||
return success(sample);
|
||||
|
||||
@@ -17,6 +17,7 @@ import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.iot.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* IoT 插件配置 Service 实现类
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user