提交 c18edfac 编写于 作者: L lepdou

update

上级 81e7900d
package com.ctrip.framework.apollo.portal.enums;
public enum ChangeType {
ADD, MODIFY, DELETE
ADDED, MODIFIED, DELETED
}
......@@ -101,10 +101,10 @@ public class ReleaseService {
String secondValue = secondItems.get(key);
//added
if (secondValue == null) {
compareResult.addEntityPair(ChangeType.DELETE, new KVEntity(key, firstValue),
compareResult.addEntityPair(ChangeType.DELETED, new KVEntity(key, firstValue),
new KVEntity(key, secondValue));
} else if (!Objects.equal(firstValue, secondValue)) {
compareResult.addEntityPair(ChangeType.MODIFY, new KVEntity(key, firstValue),
compareResult.addEntityPair(ChangeType.MODIFIED, new KVEntity(key, firstValue),
new KVEntity(key, secondValue));
}
......@@ -116,7 +116,7 @@ public class ReleaseService {
String value = entry.getValue();
if (firstItems.get(key) == null) {
compareResult
.addEntityPair(ChangeType.ADD, new KVEntity(key, ""), new KVEntity(key, value));
.addEntityPair(ChangeType.ADDED, new KVEntity(key, ""), new KVEntity(key, value));
}
}
......
......@@ -370,9 +370,9 @@
<tr ng-repeat="change in releaseCompareResult">
<td width="10%">
<span ng-show="change.type == 'ADD'">新增</span>
<span ng-show="change.type == 'MODIFY'">更新</span>
<span ng-show="change.type == 'DELETE'">删除</span>
<span ng-show="change.type == 'ADDED'">新增</span>
<span ng-show="change.type == 'MODIFIED'">更新</span>
<span ng-show="change.type == 'DELETED'">删除</span>
</td>
<td width="20%" ng-bind="change.entity.firstEntity.key">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册