类的使用
com.sie.mbm.mom.framework.common.util.R
使用R的程序包
程序包
说明
框架内部调用Feign 模块
通用工具
handler 处理
-
com.sie.mbm.mom.framework.api.feign中R的使用
修饰符和类型方法说明RemoteSysLanguageDataService.baiduTranslate(String query, String from, String to) baidu翻译FrameworkRemoteSysTenantService.createSysTenant(@Valid SysTenantSaveDTO saveDto) 创建sie租户FrameworkRemoteSysUserService.createSysUser(@Valid SysUserSaveDTO saveDto) 创建用户RemoteSysLanguageDataService.getAll()获取服务所有语言包FrameworkRemoteSysTenantService.getSysTenantByExternalId(String id) 根据华为租户id获得sie租户信息FrameworkRemoteSysTenantService.getSysTenantList(Collection<Long> ids) 根据sie租户id获取sie租户列表FrameworkRemoteSysUserService.getSysUserByUserId(String userId) 根据华为userId标识获得用户FrameworkRemoteSysUserService.getSysUserList(Collection<Long> ids) 根据sie用户id批量获取用户列表RemoteSysLanguageDataService.insertOrUpdateBatch(List<LanguagePackDTO> dto) -
com.sie.mbm.mom.framework.common.util中R的使用
类型参数类型为R的com.sie.mbm.mom.framework.common.util中的字段修饰符和类型字段说明RetOps.CODE_SUCCESS状态码为成功RetOps.DATA_AVAILABLE状态码为成功并且有值RetOps.HAS_DATA数据有值RetOps.HAS_ELEMENT数据有值,并且包含元素修饰符和类型方法说明static <T> R<T> R.failed()static <T> R<T> static <T> R<T> static <T> R<T> R.failed(T data) static <T> R<T> static <T> R<T> R.ok()static <T> R<T> R.ok(T data) static <T> R<T> RetOps.peek()观察原始值(专用程序包) static <T> R<T> R.restResult(T data, int code, String msg) 参数类型为R的com.sie.mbm.mom.framework.common.util中的方法类型变量类型为R的com.sie.mbm.mom.framework.common.util中的方法参数修饰符和类型方法说明RetOps.assertCode(int expect, Function<? super R<T>, ? extends Ex> func) 断言code的值RetOps.assertDataNotEmpty(Function<? super R<T>, ? extends Ex> func) 断言业务数据有值,并且包含元素RetOps.assertDataNotNull(Function<? super R<T>, ? extends Ex> func) 断言业务数据有值RetOps.assertSuccess(Function<? super R<T>, ? extends Ex> func) 断言成功有条件地读取data的值<U> RetOps<U> 对业务数据(data)转换void条件消费参数类型为R的com.sie.mbm.mom.framework.common.util中的构造器 -
com.sie.mbm.mom.framework.core.handler中R的使用
修饰符和类型方法说明R<?> GlobalBizExceptionHandler.handleBodyException(jakarta.validation.ValidationException exception) 集合传参校验R<?> GlobalBizExceptionHandler.handleBodyException(org.apache.ibatis.exceptions.TooManyResultsException exception) 唯一查询失败存在多条数据R<?> GlobalBizExceptionHandler.handleBodyValidException(org.springframework.validation.BindException exception) validation ExceptionR<?> GlobalBizExceptionHandler.handleGlobalException(feign.FeignException e) R<?> GlobalBizExceptionHandler.handleGlobalException(Exception e) 全局异常.R<?> GlobalBizExceptionHandler.handlerBusinessException(BusinessException e) 业务异常R<?> GlobalBizExceptionHandler.handlerExtApiException(ApiExtException e) 第三方API调用异常R<?> GlobalBizExceptionHandler.handleUnauthorizedException(Exception e) R<?> GlobalBizExceptionHandler.noHandlerFoundException()避免 404 重定向到 /error 导致NPE ,ignore-url 需要配置对应端点