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