新增云协议相关内容
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
package com.njcn.zlevent.api;
|
||||
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.mq.message.AppEventMessage;
|
||||
import com.njcn.mq.message.CldLogMessage;
|
||||
import com.njcn.zlevent.api.fallback.EventClientFallbackFactory;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -20,4 +27,7 @@ public interface EventFeignClient {
|
||||
@PostMapping("/portableData")
|
||||
HttpResult<String> getPortableData(@RequestBody AppEventMessage appEventMessage);
|
||||
|
||||
@PostMapping("/cldEventData")
|
||||
HttpResult<String> getCldEventData(@RequestBody CldLogMessage cldLogMessage);
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.mq.message.AppEventMessage;
|
||||
import com.njcn.mq.message.CldLogMessage;
|
||||
import com.njcn.zlevent.api.EventFeignClient;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -37,6 +38,12 @@ public class EventClientFallbackFactory implements FallbackFactory<EventFeignCli
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<String> getCldEventData(CldLogMessage cldLogMessage) {
|
||||
log.error("{}异常,降级处理,异常为:{}","云前置事件处理",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user