1.app远程接口代码提交

This commit is contained in:
wr
2023-11-09 16:49:02 +08:00
parent 2f674a1f53
commit b657c31e4b
35 changed files with 598 additions and 14 deletions

View File

@@ -4,8 +4,8 @@ import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.event.api.fallback.EventDetailFeignClientFallbackFactory;
import com.njcn.event.pojo.po.EventDetail;
import com.njcn.event.pojo.po.RmpEventDetailPO;
import com.njcn.event.pojo.vo.GeneralVO;
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;
@@ -51,4 +51,9 @@ public interface EventDetailFeignClient {
@PostMapping("/getEventDetailCount")
HttpResult<List<GeneralVO>> getEventDetailCount(@RequestBody Map<String, Object> condMap);
/**
* 根据暂态id集合获取暂降列表
*/
@PostMapping("/getEventDetailByIdsList")
HttpResult<List<RmpEventDetailPO>> getEventDetailByIdsList(@RequestBody List<String> ids);
}

View File

@@ -5,6 +5,7 @@ import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.event.api.EventDetailFeignClient;
import com.njcn.event.pojo.po.EventDetail;
import com.njcn.event.pojo.po.RmpEventDetailPO;
import com.njcn.event.pojo.vo.GeneralVO;
import com.njcn.event.utils.EventlEnumUtil;
import feign.hystrix.FallbackFactory;
@@ -56,6 +57,12 @@ public class EventDetailFeignClientFallbackFactory implements FallbackFactory<Ev
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<List<RmpEventDetailPO>> getEventDetailByIdsList(List<String> ids) {
log.error("{}异常,降级处理,异常为:{}", "根据暂态id集合获取暂降列表", throwable.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}