Commit abfac957 authored by 赵啸非's avatar 赵啸非

修改接口访问异步消息保存

parent f113bcff
No related merge requests found
package com.mortals.xhx.module.error.web;
import cn.hutool.core.util.IdUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.ErrorLogPdu;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.error.model.ErrorLogQuery;
import com.mortals.xhx.module.error.model.ErrorLogEntity;
import com.mortals.xhx.module.error.service.ErrorLogService;
import com.mortals.xhx.system.MessageProducer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.error.model.ErrorLogEntity;
import com.mortals.xhx.module.error.service.ErrorLogService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.*;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* 异常日志
......@@ -45,6 +31,7 @@ import static com.mortals.framework.ap.SysConstains.*;
*/
@RestController
@RequestMapping("error/log")
@Slf4j
public class ErrorLogController extends BaseCRUDJsonBodyMappingController<ErrorLogService, ErrorLogEntity, Long> {
@Autowired
......@@ -83,6 +70,8 @@ public class ErrorLogController extends BaseCRUDJsonBodyMappingController<ErrorL
@UnAuth
public String save(@RequestBody ErrorLogEntity entity) {
log.info("error==>{}",JSONObject.toJSONString(entity));
ErrorLogPdu errorLogPdu = new ErrorLogPdu();
errorLogPdu.initAttrValue();
BeanUtils.copyProperties(entity, errorLogPdu, BeanUtil.getNullPropertyNames(entity));
......
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