Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
apollo
Commits
d689fe5b
Commit
d689fe5b
authored
Nov 23, 2016
by
lepdou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix: branch modify master's item should ignore some field
parent
c06d5eee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
ItemController.java
...ramework/apollo/openapi/v1/controller/ItemController.java
+2
-0
ItemController.java
...ip/framework/apollo/portal/controller/ItemController.java
+9
-0
ItemService.java
...om/ctrip/framework/apollo/portal/service/ItemService.java
+0
-6
No files found.
apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/v1/controller/ItemController.java
View file @
d689fe5b
...
...
@@ -52,6 +52,8 @@ public class ItemController {
toCreate
.
setLineNum
(
0
);
toCreate
.
setId
(
0
);
toCreate
.
setDataChangeLastModifiedBy
(
toCreate
.
getDataChangeCreatedBy
());
toCreate
.
setDataChangeLastModifiedTime
(
null
);
toCreate
.
setDataChangeCreatedTime
(
null
);
ItemDTO
createdItem
=
itemService
.
createItem
(
appId
,
Env
.
fromString
(
env
),
clusterName
,
namespaceName
,
toCreate
);
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/ItemController.java
View file @
d689fe5b
...
...
@@ -58,6 +58,15 @@ public class ItemController {
@RequestBody
ItemDTO
item
)
{
checkModel
(
isValidItem
(
item
));
//protect
item
.
setLineNum
(
0
);
item
.
setId
(
0
);
String
userId
=
userInfoHolder
.
getUser
().
getUserId
();
item
.
setDataChangeCreatedBy
(
userId
);
item
.
setDataChangeLastModifiedBy
(
userId
);
item
.
setDataChangeCreatedTime
(
null
);
item
.
setDataChangeLastModifiedTime
(
null
);
return
configService
.
createItem
(
appId
,
Env
.
valueOf
(
env
),
clusterName
,
namespaceName
,
item
);
}
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/ItemService.java
View file @
d689fe5b
...
...
@@ -91,12 +91,6 @@ public class ItemService {
}
item
.
setNamespaceId
(
namespace
.
getId
());
if
(
StringUtils
.
isEmpty
(
item
.
getDataChangeCreatedBy
()))
{
String
username
=
userInfoHolder
.
getUser
().
getUserId
();
item
.
setDataChangeCreatedBy
(
username
);
item
.
setDataChangeLastModifiedBy
(
username
);
}
ItemDTO
itemDTO
=
itemAPI
.
createItem
(
appId
,
env
,
clusterName
,
namespaceName
,
item
);
Cat
.
logEvent
(
CatEventType
.
MODIFY_NAMESPACE
,
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
clusterName
,
namespaceName
));
return
itemDTO
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment