|
|
|
@ -38,12 +38,13 @@ public class BasedataDeviceTypeServiceImpl implements IBasedataDeviceTypeService |
|
|
|
return this.basedataDevicetypeMapper.selectBasedataDeviceTypeList(basedataDevicetype); |
|
|
|
} |
|
|
|
|
|
|
|
public int insertBasedataDeviceType(BasedataDeviceType basedataDevicetype) { |
|
|
|
BasedataDeviceType info = basedataDevicetypeMapper.selectBasedataDeviceTypeByDeviceTypeId(basedataDevicetype.getParentId()); |
|
|
|
basedataDevicetype.setLevel(info.getLevel() + 1); |
|
|
|
basedataDevicetype.setAncestors(info.getAncestors() + "," + basedataDevicetype.getParentId()); |
|
|
|
basedataDevicetype.setCreateTime(DateUtils.getNowDate()); |
|
|
|
return basedataDevicetypeMapper.insertBasedataDeviceType(basedataDevicetype); |
|
|
|
public int insertBasedataDeviceType(BasedataDeviceType basedataDeviceType) { |
|
|
|
log.info("[METADATA] insertBasedataDeviceType, param: {}", basedataDeviceType); |
|
|
|
BasedataDeviceType info = basedataDevicetypeMapper.selectBasedataDeviceTypeByDeviceTypeId(basedataDeviceType.getParentId()); |
|
|
|
basedataDeviceType.setLevel(info.getLevel() + 1); |
|
|
|
basedataDeviceType.setAncestors(info.getAncestors() + "," + basedataDeviceType.getParentId()); |
|
|
|
basedataDeviceType.setCreateTime(DateUtils.getNowDate()); |
|
|
|
return basedataDevicetypeMapper.insertBasedataDeviceType(basedataDeviceType); |
|
|
|
} |
|
|
|
|
|
|
|
public int updateBasedataDeviceType(BasedataDeviceType basedataDevicetype) { |
|
|
|
|