Commit fd7cfffa by guojuxing

添加日志操作

parent 470eb553
......@@ -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>
......
......@@ -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

......
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