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
1a9b1318
Commit
1a9b1318
authored
Dec 20, 2016
by
Jason Song
Committed by
GitHub
Dec 20, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #491 from lepdou/commit
bugfix: record empty commit when only modify item comment
parents
0f883313
049c1033
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
ItemController.java
...mework/apollo/adminservice/controller/ItemController.java
+10
-8
Commit.java
...in/java/com/ctrip/framework/apollo/biz/entity/Commit.java
+3
-1
No files found.
apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/ItemController.java
View file @
1a9b1318
...
...
@@ -90,14 +90,16 @@ public class ItemController {
builder
.
updateItem
(
beforeUpdateItem
,
entity
);
itemDTO
=
BeanUtils
.
transfrom
(
ItemDTO
.
class
,
entity
);
Commit
commit
=
new
Commit
();
commit
.
setAppId
(
appId
);
commit
.
setClusterName
(
clusterName
);
commit
.
setNamespaceName
(
namespaceName
);
commit
.
setChangeSets
(
builder
.
build
());
commit
.
setDataChangeCreatedBy
(
itemDTO
.
getDataChangeLastModifiedBy
());
commit
.
setDataChangeLastModifiedBy
(
itemDTO
.
getDataChangeLastModifiedBy
());
commitService
.
save
(
commit
);
if
(
builder
.
hasContent
())
{
Commit
commit
=
new
Commit
();
commit
.
setAppId
(
appId
);
commit
.
setClusterName
(
clusterName
);
commit
.
setNamespaceName
(
namespaceName
);
commit
.
setChangeSets
(
builder
.
build
());
commit
.
setDataChangeCreatedBy
(
itemDTO
.
getDataChangeLastModifiedBy
());
commit
.
setDataChangeLastModifiedBy
(
itemDTO
.
getDataChangeLastModifiedBy
());
commitService
.
save
(
commit
);
}
return
itemDTO
;
}
...
...
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/entity/Commit.java
View file @
1a9b1318
...
...
@@ -7,6 +7,7 @@ import org.hibernate.annotations.Where;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Lob
;
import
javax.persistence.Table
;
@Entity
...
...
@@ -15,7 +16,8 @@ import javax.persistence.Table;
@Where
(
clause
=
"isDeleted = 0"
)
public
class
Commit
extends
BaseEntity
{
@Column
(
name
=
"ChangeSets"
,
length
=
4048
,
nullable
=
false
)
@Lob
@Column
(
name
=
"ChangeSets"
,
nullable
=
false
)
private
String
changeSets
;
@Column
(
name
=
"AppId"
,
nullable
=
false
)
...
...
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