|
@@ -1,6 +1,7 @@
|
|
|
package com.middle.platform.manage.biz.service;
|
|
package com.middle.platform.manage.biz.service;
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.github.pagehelper.PageInfo;
|
|
@@ -221,7 +222,7 @@ public class IotUrlService {
|
|
|
* @param iotProduct 产品信息
|
|
* @param iotProduct 产品信息
|
|
|
*/
|
|
*/
|
|
|
public void save(IotProduct iotProduct) {
|
|
public void save(IotProduct iotProduct) {
|
|
|
- if (Objects.equals(iotProduct.getReportProtocol(), UrlProtocol.MQTT)) {
|
|
|
|
|
|
|
+ if (StrUtil.equals(iotProduct.getReportProtocol(), UrlProtocol.MQTT)) {
|
|
|
for (UrlInit value : UrlInit.values()) {
|
|
for (UrlInit value : UrlInit.values()) {
|
|
|
IotUrl iotUrl = new IotUrl();
|
|
IotUrl iotUrl = new IotUrl();
|
|
|
iotUrl.setProductId(iotProduct.getId());
|
|
iotUrl.setProductId(iotProduct.getId());
|
|
@@ -232,7 +233,7 @@ public class IotUrlService {
|
|
|
iotUrl.setType(iotProduct.getReportProtocol());
|
|
iotUrl.setType(iotProduct.getReportProtocol());
|
|
|
iotUrl.setRemark(value.getDesc());
|
|
iotUrl.setRemark(value.getDesc());
|
|
|
iotUrlMapper.insert(iotUrl);
|
|
iotUrlMapper.insert(iotUrl);
|
|
|
- subUrl(iotUrl.getUrl(), iotUrl.getFunc() + String.valueOf(iotUrl.getPermission()));
|
|
|
|
|
|
|
+ subUrl(iotUrl.getUrl(), iotUrl.getFunc() + iotUrl.getPermission());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
//http
|
|
//http
|