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

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

parent abfac957
...@@ -10,16 +10,19 @@ import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; ...@@ -10,16 +10,19 @@ 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.ErrorLogEntity; import com.mortals.xhx.module.error.model.ErrorLogEntity;
import com.mortals.xhx.module.error.model.ErrorLogQuery;
import com.mortals.xhx.module.error.service.ErrorLogService; 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 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.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 java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -70,14 +73,14 @@ public class ErrorLogController extends BaseCRUDJsonBodyMappingController<ErrorL ...@@ -70,14 +73,14 @@ 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)); /* 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));
messageProducer.syncErrorSend(errorLogPdu); messageProducer.syncErrorSend(errorLogPdu);*/
/* ErrorLogQuery errorLogQuery = new ErrorLogQuery(); ErrorLogQuery errorLogQuery = new ErrorLogQuery();
errorLogQuery.setAppName(entity.getAppName()); errorLogQuery.setAppName(entity.getAppName());
errorLogQuery.setPlatform(entity.getPlatform()); errorLogQuery.setPlatform(entity.getPlatform());
errorLogQuery.setErrorStack(entity.getErrorStack()); errorLogQuery.setErrorStack(entity.getErrorStack());
...@@ -86,7 +89,7 @@ public class ErrorLogController extends BaseCRUDJsonBodyMappingController<ErrorL ...@@ -86,7 +89,7 @@ public class ErrorLogController extends BaseCRUDJsonBodyMappingController<ErrorL
entity.setId(errorLogEntity.getId()); entity.setId(errorLogEntity.getId());
entity.setCheckNum(errorLogEntity.getCheckNum() + 1); entity.setCheckNum(errorLogEntity.getCheckNum() + 1);
entity.setUpdateTime(new Date()); entity.setUpdateTime(new Date());
}*/ }
JSONObject ret = new JSONObject(); JSONObject ret = new JSONObject();
ret.put("code", VALUE_RESULT_SUCCESS); ret.put("code", VALUE_RESULT_SUCCESS);
......
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