Commit b264b490 by Jason Song Committed by GitHub

Merge pull request #410 from lepdou/bugfix_0918

bugfix: fix last modify by not update bug
parents 7611164e 131c4f6e
...@@ -68,6 +68,9 @@ public class ItemController { ...@@ -68,6 +68,9 @@ public class ItemController {
@RequestBody ItemDTO item) { @RequestBody ItemDTO item) {
checkModel(isValidItem(item)); checkModel(isValidItem(item));
String username = userInfoHolder.getUser().getUserId();
item.setDataChangeLastModifiedBy(username);
configService.updateItem(appId, Env.valueOf(env), clusterName, namespaceName, item); configService.updateItem(appId, Env.valueOf(env), clusterName, namespaceName, item);
} }
......
...@@ -99,10 +99,6 @@ public class ItemService { ...@@ -99,10 +99,6 @@ public class ItemService {
} }
public void updateItem(String appId, Env env, String clusterName, String namespaceName, ItemDTO item) { public void updateItem(String appId, Env env, String clusterName, String namespaceName, ItemDTO item) {
if (StringUtils.isEmpty(item.getDataChangeLastModifiedBy())) {
String username = userInfoHolder.getUser().getUserId();
item.setDataChangeLastModifiedBy(username);
}
itemAPI.updateItem(appId, env, clusterName, namespaceName, item.getId(), item); itemAPI.updateItem(appId, env, clusterName, namespaceName, item.getId(), item);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment