Commit 9982e807 by guojuxing

日志工具类调整

parent 0fd3170a
......@@ -34,4 +34,14 @@ public class OperationResultUtils {
public static String getOperationObject(ServiceResponse<String> result) {
return result.isSuccess() ? result.getResult() : null;
}
public static RestResponse operationResult(ServiceResponse response, String content) {
if (response.isSuccess()) {
String operationObject = (String) response.getResult();
LogUtils.createLog(content, operationObject);
return RestResponse.success(response.getResult());
} else {
return RestResponse.failure(response.getCode(), response.getMessage());
}
}
}
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