Commit 8892d7b2 by guojuxing

日志添加修复

parent fa01d7a7
......@@ -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>
......
......@@ -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

......
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;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment