增加配置属性
This commit is contained in:
parent
ec5581c2ca
commit
00bd6af8d8
|
|
@ -128,7 +128,7 @@ public interface DevInfoMapper {
|
||||||
|
|
||||||
List<DevInfoVo> selectDevInfoLists(DevInfoVo devInfo);
|
List<DevInfoVo> selectDevInfoLists(DevInfoVo devInfo);
|
||||||
|
|
||||||
List<DevInfoPropertyVo> selectDevInfoProperties();
|
List<DevInfoPropertyVo> selectDevInfoProperties(@Param("maId")Long maId);
|
||||||
|
|
||||||
int deleteDevInfoProperties(@Param("maId")Long maId);
|
int deleteDevInfoProperties(@Param("maId")Long maId);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,6 +137,9 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
if (!CollectionUtils.isEmpty(leaseList)) {
|
if (!CollectionUtils.isEmpty(leaseList)) {
|
||||||
devInfoVo.setLeaseList(leaseList);
|
devInfoVo.setLeaseList(leaseList);
|
||||||
}
|
}
|
||||||
|
//查询自定义属性
|
||||||
|
List<DevInfoPropertyVo> properties = devInfoMapper.selectDevInfoProperties(maId);
|
||||||
|
devInfoVo.setDevInfoProperties(properties);
|
||||||
}
|
}
|
||||||
return devInfoVo;
|
return devInfoVo;
|
||||||
}
|
}
|
||||||
|
|
@ -548,13 +551,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
@Override
|
@Override
|
||||||
public List<DevInfoVo> selectDevInfoLists(DevInfoVo devInfo) {
|
public List<DevInfoVo> selectDevInfoLists(DevInfoVo devInfo) {
|
||||||
devInfo.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId().toString());
|
devInfo.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId().toString());
|
||||||
List<DevInfoVo> devInfoVos = devInfoMapper.selectDevInfoLists(devInfo);
|
return devInfoMapper.selectDevInfoLists(devInfo);
|
||||||
List<DevInfoPropertyVo> devInfoProperties = devInfoMapper.selectDevInfoProperties();
|
|
||||||
Map<Long, List<DevInfoPropertyVo>> map = devInfoProperties.stream().collect(Collectors.groupingBy(DevInfoPropertyVo::getMaId));
|
|
||||||
for (DevInfoVo devInfos : devInfoVos) {
|
|
||||||
devInfos.setDevInfoProperties(map.get(devInfos.getMaId()));
|
|
||||||
}
|
|
||||||
return devInfoVos;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -536,6 +536,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
property_name as propertyName,
|
property_name as propertyName,
|
||||||
property_value as propertyValue
|
property_value as propertyValue
|
||||||
from ma_dev_info_properties
|
from ma_dev_info_properties
|
||||||
|
where ma_id = #{maId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<delete id="deleteDevInfoProperties">
|
<delete id="deleteDevInfoProperties">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue