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
e45c7bc3
Commit
e45c7bc3
authored
Aug 11, 2016
by
lepdou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
a91fce64
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
14 deletions
+4
-14
OpenItemDTO.java
...a/com/ctrip/framework/apollo/openapi/dto/OpenItemDTO.java
+0
-10
ItemController.java
...ramework/apollo/openapi/v1/controller/ItemController.java
+4
-4
No files found.
apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/dto/OpenItemDTO.java
View file @
e45c7bc3
...
...
@@ -4,22 +4,12 @@ import com.ctrip.framework.apollo.common.dto.BaseDTO;
public
class
OpenItemDTO
extends
BaseDTO
{
private
long
id
;
private
String
key
;
private
String
value
;
private
String
comment
;
public
long
getId
()
{
return
id
;
}
public
void
setId
(
long
id
)
{
this
.
id
=
id
;
}
public
String
getKey
()
{
return
key
;
}
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/v1/controller/ItemController.java
View file @
e45c7bc3
...
...
@@ -70,7 +70,7 @@ public class ItemController {
!
StringUtils
.
isContainEmpty
(
item
.
getKey
(),
item
.
getValue
(),
item
.
getDataChangeLastModifiedBy
()),
"key,value,dataChangeLastModifiedBy 字段不能为空"
);
RequestPrecondition
.
checkArguments
(
item
.
getKey
().
equals
(
key
),
"
item payload can not be empty
"
);
RequestPrecondition
.
checkArguments
(
item
.
getKey
().
equals
(
key
),
"
path中的key和payload中的key不一致
"
);
if
(
userService
.
findByUserId
(
item
.
getDataChangeLastModifiedBy
())
==
null
)
{
throw
new
BadRequestException
(
"用户不存在"
);
...
...
@@ -100,12 +100,12 @@ public class ItemController {
throw
new
BadRequestException
(
"用户不存在"
);
}
ItemDTO
toDelete
d
Item
=
itemService
.
loadItem
(
Env
.
valueOf
(
env
),
appId
,
clusterName
,
namespaceName
,
key
);
if
(
toDelete
d
Item
==
null
){
ItemDTO
toDeleteItem
=
itemService
.
loadItem
(
Env
.
valueOf
(
env
),
appId
,
clusterName
,
namespaceName
,
key
);
if
(
toDeleteItem
==
null
){
throw
new
BadRequestException
(
"item不存在"
);
}
itemService
.
deleteItem
(
Env
.
fromString
(
env
),
toDelete
d
Item
.
getId
(),
operator
);
itemService
.
deleteItem
(
Env
.
fromString
(
env
),
toDeleteItem
.
getId
(),
operator
);
}
}
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