Pre Merge pull request !154 from 小谈同学/master-jdk17

pull/154/MERGE
小谈同学 2025-05-13 12:15:28 +00:00 committed by Gitee
commit 2bd3f8f5b8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
54 changed files with 433 additions and 47 deletions

View File

@ -31,6 +31,7 @@ public interface GlobalErrorCodeConstants {
ErrorCode INTERNAL_SERVER_ERROR = new ErrorCode(500, "系统异常");
ErrorCode NOT_IMPLEMENTED = new ErrorCode(501, "功能未实现/未开启");
ErrorCode ERROR_CONFIGURATION = new ErrorCode(502, "错误的配置项");
ErrorCode FEIGN_ERROR = new ErrorCode(555, "rpc远程调用异常");
// ========== 自定义错误段 ==========
ErrorCode REPEATED_REQUESTS = new ErrorCode(900, "重复请求,请稍后重试"); // 重复请求

View File

@ -0,0 +1,34 @@
package cn.iocoder.yudao.framework.rpc.config;
import cn.iocoder.yudao.framework.rpc.core.fallback.YudaoFeignBuilder;
import com.alibaba.cloud.sentinel.feign.SentinelFeignAutoConfiguration;
import feign.Feign;
import feign.RequestInterceptor;
import jakarta.annotation.Resource;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Scope;
import java.util.List;
/**
* @Description Rpc
* @Author tpz
* @Date 2024/10/30 14:27
*/
@AutoConfiguration
public class YudaoCloudRpcAutoConfiguration {
@Resource
private List<RequestInterceptor> requestInterceptors;
@Bean
@Scope("prototype")
@ConditionalOnMissingBean
public Feign.Builder feignSentinelBuilder() {
return new YudaoFeignBuilder().requestInterceptors(requestInterceptors);
}
}

View File

@ -1,4 +1,6 @@
/**
* TODO
* open-feign
*
* @author tpz
*/
package cn.iocoder.yudao.framework.rpc.config;

View File

@ -0,0 +1,28 @@
package cn.iocoder.yudao.framework.rpc.core.fallback;
import feign.Target;
import lombok.AllArgsConstructor;
import org.springframework.cglib.proxy.Enhancer;
import org.springframework.cloud.openfeign.FallbackFactory;
/**
* FallbackFactory,FallbackFactoryFallbackFactory
* tips:使CGLIBEnhancer+MethodInterceptor
* @author tpz
*/
@AllArgsConstructor
public class YudaoFallbackFactory<T> implements FallbackFactory<T> {
// 代理对象
private final Target<T> target;
@SuppressWarnings("unchecked")
@Override
public T create(Throwable cause) {
Enhancer enhancer = new Enhancer();
enhancer.setSuperclass(target.type());
enhancer.setUseCache(true);
enhancer.setCallback(new YudaoFeignFallback<>(target.type(), target.name(), cause));
return (T) enhancer.create();
}
}

View File

@ -0,0 +1,91 @@
package cn.iocoder.yudao.framework.rpc.core.fallback;
import feign.Feign;
import feign.InvocationHandlerFactory;
import feign.Target;
import lombok.SneakyThrows;
import org.springframework.beans.BeansException;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.FeignClientFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.util.StringUtils;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.util.Map;
/**
* @Description Feign Builder fallback peignfallback
* @Author tpz
* @Date 2024/10/30 14:37
*/
public class YudaoFeignBuilder extends Feign.Builder implements ApplicationContextAware {
public String CONTEXT_FALL_BACK = "fallback";
public String CONTEXT_FALL_BACK_FACTORY = "fallbackFactory";
private FeignClientFactory feignClientFactoryBean;
@Override
public Feign internalBuild() {
super.invocationHandlerFactory(new InvocationHandlerFactory() {
@SneakyThrows
@Override
public InvocationHandler create(Target target, Map<Method, MethodHandler> dispatch) {
// 获取 FeignClient 注解信息
FeignClient feignClient = AnnotationUtils.findAnnotation(target.type(), FeignClient.class);
assert feignClient != null;
Class<?> fallback = feignClient.fallback();
Class<?> fallbackFactory = feignClient.fallbackFactory();
String contextId = feignClient.contextId();
if (!StringUtils.hasText(contextId)) {
contextId = feignClient.name();
}
Object fallbackInstance;
FallbackFactory<?> fallbackFactoryInstance;
// 如果有自定义fallback使用自定义fallback
if (void.class != fallback) {
fallbackInstance = getFromContext(contextId, CONTEXT_FALL_BACK, fallback, target.type());
return new YudaoInvocationHandler(target, dispatch, new FallbackFactory.Default<>(fallbackInstance));
}
// 如果有自定义fallbackFactory使用自定义fallbackFactory
if (void.class != fallbackFactory) {
fallbackFactoryInstance = (FallbackFactory<?>) getFromContext(contextId, CONTEXT_FALL_BACK_FACTORY, fallbackFactory, FallbackFactory.class);
return new YudaoInvocationHandler(target, dispatch, fallbackFactoryInstance);
}
// 默认的FallbackFactory
YudaoFallbackFactory<?> defaultFallbackFactory = new YudaoFallbackFactory<>(target);
return new YudaoInvocationHandler(target, dispatch, defaultFallbackFactory);
}
private Object getFromContext(String name, String type, Class<?> fallbackType, Class<?> targetType) {
Object fallbackInstance = feignClientFactoryBean.getInstance(name, fallbackType);
if (fallbackInstance == null) {
throw new IllegalStateException(String.format("【rpc 配置错误】类型未找到 name:[{%s}] fallbackType:[{%s}]", name, fallbackType));
}
if (!targetType.isAssignableFrom(fallbackType)) {
throw new IllegalStateException(String.format("【rpc 配置错误】实例不兼容 name:[{%s}]", name));
}
return fallbackInstance;
}
});
super.contract(contract);
return super.internalBuild();
}
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
feignClientFactoryBean = applicationContext.getBean(FeignClientFactory.class);
}
}

View File

@ -0,0 +1,69 @@
package cn.iocoder.yudao.framework.rpc.core.fallback;
import cn.iocoder.yudao.framework.common.exception.ServiceException;
import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cglib.proxy.MethodInterceptor;
import org.springframework.cglib.proxy.MethodProxy;
import org.springframework.lang.Nullable;
import java.lang.reflect.Method;
import java.util.Objects;
/**
* fallback
* 1 便
* 2
* @author tpz
*/
@Slf4j
@AllArgsConstructor
public class YudaoFeignFallback<T> implements MethodInterceptor {
// 代理类
private final Class<T> targetType;
private final String targetName;
private final Throwable cause;
/**
* fallback
* @author tpz
* @date 2024/10/31 9:23
**/
@Nullable
@Override
public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
String errorMessage = cause.getMessage();
log.error("【rpc调用异常】被调服务:[{}] 错误信息:[{}]", targetName, errorMessage);
// 否则是在调用的过程中发生的异常
if (cause instanceof ServiceException) {
Integer code = ((ServiceException) cause).getCode();
// 如果是系统异常直接返回feign错误编码 否则返回业务异常的编码
return CommonResult.error(Objects.equals(code, GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode()) ?
GlobalErrorCodeConstants.FEIGN_ERROR.getCode() : code, errorMessage);
}
// 其他情况统一返回feign的错误编码
return CommonResult.error(GlobalErrorCodeConstants.FEIGN_ERROR.getCode(), errorMessage);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
YudaoFeignFallback<?> that = (YudaoFeignFallback<?>) o;
return targetType.equals(that.targetType);
}
@Override
public int hashCode() {
return Objects.hash(targetType);
}
}

View File

@ -0,0 +1,152 @@
package cn.iocoder.yudao.framework.rpc.core.fallback;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import feign.InvocationHandlerFactory;
import feign.Target;
import org.springframework.cloud.openfeign.FallbackFactory;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.LinkedHashMap;
import java.util.Map;
import static feign.Util.checkNotNull;
/**
* fallback
* @author tpz
*/
public class YudaoInvocationHandler implements InvocationHandler {
private final Target<?> target;
private final Map<Method, InvocationHandlerFactory.MethodHandler> dispatch;
private FallbackFactory<?> fallbackFactory;
private Map<Method, Method> fallbackMethodMap;
public YudaoInvocationHandler(Target<?> target, Map<Method, InvocationHandlerFactory.MethodHandler> dispatch,
FallbackFactory<?> fallbackFactory) {
this.target = checkNotNull(target, "target");
this.dispatch = checkNotNull(dispatch, "dispatch");
this.fallbackFactory = fallbackFactory;
this.fallbackMethodMap = toFallbackMethod(dispatch);
}
public YudaoInvocationHandler(Target<?> target, Map<Method, InvocationHandlerFactory.MethodHandler> dispatch) {
this.target = checkNotNull(target, "target");
this.dispatch = checkNotNull(dispatch, "dispatch");
}
@Override
public Object invoke(final Object proxy, final Method method, final Object[] args)
throws Throwable {
// 其他方法直接执行
Object result = handleNormalMethod(method, args);
if (result != null) return result;
// 获取当前执行代理的方法
InvocationHandlerFactory.MethodHandler methodHandler = this.dispatch.get(method);
// 只代理feign的HardCodedTarget
if (target instanceof Target.HardCodedTarget) {
try {
// 执行远程调用
result = methodHandler.invoke(args);
// 执行错误的情况
handleErrResult(result);
} catch (Throwable ex) {
// fallback handle
if (fallbackFactory != null) {
try {
// 根据方法名称使用过程创建代理对象
return fallbackMethodMap.get(method)
.invoke(fallbackFactory.create(ex), args);
} catch (IllegalAccessException e) {
throw new AssertionError(e);
} catch (InvocationTargetException e) {
throw new AssertionError(e.getCause());
}
} else {
// 没有fallback就报错
throw ex;
}
}
} else {
// 直接执行
result = methodHandler.invoke(args);
}
return result;
}
/**
*
*
* @author tpz
* @date 2024/10/30 16:41
**/
private Object handleNormalMethod(Method method, Object[] args) {
if ("equals".equals(method.getName())) {
try {
Object otherHandler = args.length > 0 && args[0] != null
? Proxy.getInvocationHandler(args[0]) : null;
return equals(otherHandler);
} catch (IllegalArgumentException e) {
return false;
}
} else if ("hashCode".equals(method.getName())) {
return hashCode();
} else if ("toString".equals(method.getName())) {
return toString();
}
return null;
}
/**
* fallback
*
* @author tpz
* @date 2024/10/30 18:08
**/
private void handleErrResult(Object result) {
if (result instanceof CommonResult) {
// 如果请远程调用报错会抛出遗异常
((CommonResult<?>) result).getCheckedData();
}
}
@Override
public boolean equals(Object obj) {
if (obj instanceof YudaoInvocationHandler) {
YudaoInvocationHandler other = (YudaoInvocationHandler) obj;
return target.equals(other.target);
}
return false;
}
@Override
public int hashCode() {
return target.hashCode();
}
@Override
public String toString() {
return target.toString();
}
/**
* @author tpz
* @date 2024/10/30 16:42
**/
static Map<Method, Method> toFallbackMethod(Map<Method, InvocationHandlerFactory.MethodHandler> dispatch) {
Map<Method, Method> result = new LinkedHashMap<>();
for (Method method : dispatch.keySet()) {
method.setAccessible(true);
result.put(method, method);
}
return result;
}
}

View File

@ -0,0 +1,6 @@
/**
* 使fallbackfallback
*
* @author tpz
*/
package cn.iocoder.yudao.framework.rpc.core.fallback;

View File

@ -1,4 +1,6 @@
/**
* TODO
* feign
*
* @author tpz
*/
package cn.iocoder.yudao.framework.rpc.core;

View File

@ -1,6 +1,6 @@
/**
* OpenFeign RESTful API
* feign
*
* @author
* @author tpz
*/
package cn.iocoder.yudao.framework.rpc;

View File

@ -0,0 +1 @@
cn.iocoder.yudao.framework.rpc.config.YudaoCloudRpcAutoConfiguration

View File

@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import jakarta.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 流程实例")
public interface BpmProcessInstanceApi {

View File

@ -8,7 +8,7 @@ import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 参数配置")
public interface ConfigApi {

View File

@ -11,7 +11,7 @@ import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 文件")
public interface FileApi {

View File

@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import jakarta.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - API 访问日志")
public interface ApiAccessLogApi {

View File

@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import jakarta.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - API 异常日志")
public interface ApiErrorLogApi {

View File

@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import jakarta.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - WebSocket 发送器的") // 对 WebSocketMessageSender 进行封装,提供给其它模块使用
public interface WebSocketSenderApi {

View File

@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.Collection;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 商品分类")
public interface ProductCategoryApi {

View File

@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import jakarta.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 产品评论")
public interface ProductCommentApi {

View File

@ -20,7 +20,7 @@ import java.util.Map;
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 商品 SKU")
public interface ProductSkuApi {

View File

@ -16,7 +16,7 @@ import java.util.Map;
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 商品 SPU")
public interface ProductSpuApi {

View File

@ -10,7 +10,7 @@ import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 砍价活动")
public interface BargainActivityApi {

View File

@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 砍价记录")
public interface BargainRecordApi {

View File

@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import jakarta.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 拼团记录")
public interface CombinationRecordApi {

View File

@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 优惠劵")
public interface CouponApi {

View File

@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.Collection;
import java.util.List;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 限时折扣")
public interface DiscountActivityApi {

View File

@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 秒杀活动")
public interface PointActivityApi {

View File

@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.Collection;
import java.util.List;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 满减送")
public interface RewardActivityApi {

View File

@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 秒杀活动")
public interface SeckillActivityApi {

View File

@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.Collection;
import java.util.List;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 订单")
public interface TradeOrderApi {

View File

@ -11,7 +11,7 @@ import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 用户收件地址")
public interface MemberAddressApi {

View File

@ -8,7 +8,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 用户配置")
public interface MemberConfigApi {

View File

@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 会员等级")
public interface MemberLevelApi {

View File

@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import jakarta.validation.constraints.Min;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 用户积分")
public interface MemberPointApi {

View File

@ -16,7 +16,7 @@ import java.util.Map;
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 会员用户")
public interface MemberUserApi {

View File

@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.*;
import jakarta.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 支付单")
public interface PayOrderApi {

View File

@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import jakarta.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 退款单")
public interface PayRefundApi {

View File

@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 转账单")
public interface PayTransferApi {

View File

@ -16,7 +16,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 部门")
public interface DeptApi {

View File

@ -17,7 +17,7 @@ import java.util.Collection;
import java.util.List;
import java.util.Map;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 岗位")
public interface PostApi {

View File

@ -18,7 +18,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 字典数据")
public interface DictDataApi {

View File

@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import jakarta.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 登录日志")
public interface LoginLogApi {

View File

@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 操作日志")
public interface OperateLogApi {

View File

@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.RequestBody;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 邮件发送")
public interface MailSendApi {

View File

@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.RequestBody;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 站内信发送")
public interface NotifyMessageSendApi {

View File

@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.*;
import jakarta.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - OAuth2.0 令牌")
public interface OAuth2TokenApi {

View File

@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.Collection;
import java.util.Set;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 权限")
public interface PermissionApi {

View File

@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.Collection;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 角色")
public interface RoleApi {

View File

@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import jakarta.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 短信验证码")
public interface SmsCodeApi {

View File

@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import jakarta.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 短信发送")
public interface SmsSendApi {

View File

@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 社交应用")
public interface SocialClientApi {

View File

@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.*;
import jakarta.validation.Valid;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 社交用户")
public interface SocialUserApi {

View File

@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 多租户")
public interface TenantApi {

View File

@ -22,7 +22,7 @@ import java.util.Map;
import static cn.iocoder.yudao.module.system.api.user.AdminUserApi.PREFIX;
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿fallbackFactory =
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 管理员用户")
@AutoTrans(namespace = PREFIX, fields = {"nickname"})
public interface AdminUserApi extends AutoTransable<AdminUserRespDTO> {