fix: asset未找到type时 指定other id 由-1改为9
This commit is contained in:
@@ -167,7 +167,7 @@ public class AssetAssetServiceImpl extends ServiceImpl<AssetAssetDao, AssetAsset
|
||||
assetAsset.setPid(-1);
|
||||
assetAsset.setBrandId(modelAndBrand.get(asset.getModelId()));
|
||||
Integer typeId = assetTypeNameAndId.get(modelIdAndTypeName.get(asset.getModelId()));
|
||||
assetAsset.setTypeId(ToolUtil.isNotEmpty(typeId)?typeId:-1);
|
||||
assetAsset.setTypeId(ToolUtil.isNotEmpty(typeId)?typeId:9);
|
||||
assetAsset.setModelId(asset.getModelId());
|
||||
assetAsset.setStateId(asset.getState());
|
||||
assetAsset.setDcId(asset.getIdcId());
|
||||
|
||||
@@ -67,6 +67,6 @@ public class AssetTypeConfServiceImpl extends ServiceImpl<AssetTypeConfDao, Asse
|
||||
if(ToolUtil.isNotEmpty(assetTypeConfs)) {
|
||||
this.saveBatch(assetTypeConfs);
|
||||
}*/
|
||||
sqlDao.execute("INSERT INTO asset_type_conf(`pid`, `vm`, `vmh`, `name`, `remark`, `build_in`, `auth_protocol`, `snmp_enable`, `snmp_collect`, `ssh_collect`, `ssh_collect_script`) VALUES (0, '0', '0', 'Other', '', '1', 0, 0, 0, 0, '')");
|
||||
sqlDao.execute("INSERT INTO asset_type_conf(`id`,`pid`, `vm`, `vmh`, `name`, `remark`, `build_in`, `auth_protocol`, `snmp_enable`, `snmp_collect`, `ssh_collect`, `ssh_collect_script`) VALUES (9,0, '0', '0', 'Other', '', '1', 0, 0, 0, 0, '')");
|
||||
}
|
||||
}
|
||||
|
||||
1871
src/main/resources/db/init.sql
Normal file
1871
src/main/resources/db/init.sql
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user