Commit 131c4f6e by zhangle

bugfix: fix last modify by not update bug

parent 806ceb44
...@@ -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