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

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

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