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
8892d7b2
Commit
8892d7b2
authored
Nov 08, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志添加修复
parent
fa01d7a7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
29 deletions
+31
-29
pom.xml
gic-enterprise-base-api/pom.xml
+0
-5
ResultControllerUtils.java
.../java/com/gic/enterprise/utils/ResultControllerUtils.java
+0
-24
OperationResultUtils.java
...ain/java/com/gic/download/utils/OperationResultUtils.java
+31
-0
No files found.
gic-enterprise-base-api/pom.xml
View file @
8892d7b2
...
...
@@ -67,11 +67,6 @@
<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 @
8892d7b2
...
...
@@ -6,7 +6,6 @@ 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统一返回结果
...
...
@@ -17,29 +16,6 @@ import com.gic.enterprise.exception.CommonException;
*/
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
());
}
}
public
static
String
getOperationObject
(
ServiceResponse
<
String
>
result
)
{
return
result
.
isSuccess
()
?
result
.
getResult
()
:
null
;
}
/**
* 统一返回成功结果
* @Title: commonResult
...
...
gic-enterprise-download/src/main/java/com/gic/download/utils/OperationResultUtils.java
0 → 100644
View file @
8892d7b2
package
com
.
gic
.
download
.
utils
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.download.utils.log.LogUtils
;
public
class
OperationResultUtils
{
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
());
}
}
public
static
String
getOperationObject
(
ServiceResponse
<
String
>
result
)
{
return
result
.
isSuccess
()
?
result
.
getResult
()
:
null
;
}
}
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