Browse Source

bug 修复

thing_master
xiachao 1 year ago
parent
commit
bb53af6c95
  1. 2
      modules/thing/src/main/resources/mapper/control/IotDeviceControlMapper.xml
  2. 2
      modules/visual-design/src/main/java/com/thing/visual/component/service/impl/IotVisualComponentServiceImpl.java
  3. 4
      modules/visual-design/src/main/java/com/thing/visual/group/service/impl/IotVisualGroupServiceImpl.java

2
modules/thing/src/main/resources/mapper/control/IotDeviceControlMapper.xml

@ -32,7 +32,7 @@
FROM
iot_device_control idc
LEFT JOIN iot_thing_entity itt ON idc.thing_id = itt.id
INNER JOIN iot_thing_dict itd ON idc.attr_id = itd.id
INNER JOIN iot_thing_dict_relation itd ON idc.attr_id = itd.id
<where>
<if test="ids != null">
and idc.id in

2
modules/visual-design/src/main/java/com/thing/visual/component/service/impl/IotVisualComponentServiceImpl.java

@ -99,7 +99,7 @@ public class IotVisualComponentServiceImpl extends BaseServiceImpl<IotVisualComp
public List<GroupInfo> businessList() {
Long tenantCode = UserContext.getTenantCode();
QueryWrapper wrapper = new QueryWrapper();
wrapper.eq("name","远程组件");
wrapper.eq("name","远程");
wrapper.and(IOT_VISUAL_GROUP_ENTITY.TENANT_CODE.eq(tenantCode).or(IOT_VISUAL_GROUP_ENTITY.IS_DEFAULT.eq("1")));
wrapper.orderBy("bs_sort",true);

4
modules/visual-design/src/main/java/com/thing/visual/group/service/impl/IotVisualGroupServiceImpl.java

@ -128,7 +128,11 @@ public class IotVisualGroupServiceImpl extends BaseServiceImpl<IotVisualGroupMap
.from(IOT_VISUAL_GROUP_ENTITY).eq(IotVisualGroupEntity::getType,type);
wrapper.and(IOT_VISUAL_GROUP_ENTITY.TENANT_CODE.eq(tenantCode).or(IOT_VISUAL_GROUP_ENTITY.IS_DEFAULT.eq("1")));
GroupSortInfo maxSort = this.mapper.selectOneByQueryAs(wrapper,GroupSortInfo.class);
try {
sortInfo.setSort(maxSort.getSort()+1);
} catch (Exception e) {
sortInfo.setSort(1);
}
return sortInfo;
}

Loading…
Cancel
Save