Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-enterprise-base
Overview
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
base_platform_enterprise
gic-enterprise-base
Commits
fd7cfffa
Commit
fd7cfffa
authored
Nov 08, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加日志操作
parent
470eb553
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
pom.xml
gic-enterprise-base-api/pom.xml
+5
-0
ResultControllerUtils.java
.../java/com/gic/enterprise/utils/ResultControllerUtils.java
+21
-0
No files found.
gic-enterprise-base-api/pom.xml
View file @
fd7cfffa
...
...
@@ -67,6 +67,11 @@
<version>
${gic-commons}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-enterprise-download
</artifactId>
<version>
${gic-enterprise-download}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-redis-data
</artifactId>
<version>
${gic-redis-data}
</version>
...
...
gic-enterprise-base-api/src/main/java/com/gic/enterprise/utils/ResultControllerUtils.java
View file @
fd7cfffa
...
...
@@ -6,6 +6,7 @@ import com.gic.api.base.commons.Page;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.download.utils.log.LogUtils
;
import
com.gic.enterprise.exception.CommonException
;
/**
* controller统一返回结果
...
...
@@ -15,6 +16,26 @@ import com.gic.enterprise.exception.CommonException;
* @date 2019/8/15 2:34 PM
*/
public
class
ResultControllerUtils
{
public
static
final
String
LOG_NEW
=
"新增"
;
public
static
final
String
LOG_EDIT
=
"修改"
;
public
static
final
String
LOG_DELETE
=
"删除"
;
public
static
final
String
LOG_SORT
=
"排序"
;
/**
* 新增/编辑/删除接口(含日志)
* @param response
* @return
*/
public
static
RestResponse
operationResult
(
ServiceResponse
response
,
String
content
,
String
operationObject
)
{
if
(
response
.
isSuccess
())
{
LogUtils
.
createLog
(
content
,
operationObject
);
return
RestResponse
.
success
(
response
.
getResult
());
}
else
{
return
RestResponse
.
failure
(
response
.
getCode
(),
response
.
getMessage
());
}
}
/**
* 统一返回成功结果
* @Title: commonResult
...
...
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