|
@@ -58,14 +58,17 @@ public class PropertyService extends ServiceImpl<PropertyItemDao, PropertyItem>
|
|
|
throw new ParameterException("暂不支持非properties类型文件");
|
|
|
}
|
|
|
long time = System.currentTimeMillis();
|
|
|
- propertyItemDao.delete(new LambdaUpdateWrapper<PropertyItem>().eq(PropertyItem::getAppId, app.getId())
|
|
|
- .eq(PropertyItem::getVersionId, version.getId()).eq(PropertyItem::getModuleId, module.getId())
|
|
|
- .eq(PropertyItem::getEnvId, BASELINE_ENV_ID));
|
|
|
final Map<String, PropertyItem> baseMap = new HashMap<>();
|
|
|
if (inheritVersion != null) {
|
|
|
listBaseline(app.getId(), inheritVersion.getId(), module.getId())
|
|
|
.forEach(item -> baseMap.put(item.getKey(), item));
|
|
|
+ } else {
|
|
|
+ listBaseline(app.getId(), version.getId(), module.getId())
|
|
|
+ .forEach(item -> baseMap.put(item.getKey(), item));
|
|
|
}
|
|
|
+ propertyItemDao.delete(new LambdaUpdateWrapper<PropertyItem>().eq(PropertyItem::getAppId, app.getId())
|
|
|
+ .eq(PropertyItem::getVersionId, version.getId()).eq(PropertyItem::getModuleId, module.getId())
|
|
|
+ .eq(PropertyItem::getEnvId, BASELINE_ENV_ID));
|
|
|
List<PropertyItem> list = PropertyFileUtil.read(file);
|
|
|
for (PropertyItem item : list) {
|
|
|
item.setAppId(app.getId());
|