接口 BaseController<Id extends Serializable,Entity extends SuperEntity<Id>>

类型参数:
Entity - 实体
所有已知子接口:
DeleteController<Id,Entity>, DownloadController<Id,Entity>, PageController<Id,Entity,PageQuery,ResultVO>, QueryController<Id,Entity,PageQuery,ResultVO>, SaveController<Id,Entity,SaveVO>, UpdateController<Id,Entity,UpdateVO>
所有已知实现类:
SuperCacheController, SuperController, SuperExcelController, SuperReadController, SuperSimpleController, SuperWriteController

public interface BaseController<Id extends Serializable,Entity extends SuperEntity<Id>>
基础接口
作者:
zuihou
  • 方法详细资料

    • getSuperService

      SuperService<Id,Entity> getSuperService()
      获取Service
      返回:
      Service
    • getEntityClass

      Class<Entity> getEntityClass()
      获取实体的类型
      返回:
      实体的类型
    • success

      default <T> R<T> success(T data)
      成功返回
      类型参数:
      T - 返回类型
      参数:
      data - 返回内容
      返回:
      R 成功
    • success

      default R<Boolean> success()
      成功返回
      返回:
      R.true
    • fail

      default <T> R<T> fail(String msg)
      失败返回
      类型参数:
      T - 返回类型
      参数:
      msg - 失败消息
      返回:
      失败
    • fail

      default <T> R<T> fail(String msg, Object... args)
      失败返回
      类型参数:
      T - 返回类型
      参数:
      msg - 失败消息
      args - 动态参数
      返回:
      失败
    • fail

      default <T> R<T> fail(int code, String msg)
      失败返回
      类型参数:
      T - 返回类型
      参数:
      code - 失败编码
      msg - 失败消息
      返回:
      失败
    • fail

      default <T> R<T> fail(BaseExceptionCode exceptionCode)
      失败返回
      参数:
      exceptionCode - 失败异常码
      返回:
      失败
    • fail

      default <T> R<T> fail(BizException exception)
      失败返回
      参数:
      exception - 异常
      返回:
      失败
    • fail

      default <T> R<T> fail(Throwable throwable)
      失败返回
      参数:
      throwable - 异常
      返回:
      失败
    • validFail

      default <T> R<T> validFail(String msg)
      参数校验失败返回
      参数:
      msg - 错误消息
      返回:
      失败
    • validFail

      default <T> R<T> validFail(String msg, Object... args)
      参数校验失败返回
      参数:
      msg - 错误消息
      args - 错误参数
      返回:
      失败
    • validFail

      default <T> R<T> validFail(BaseExceptionCode exceptionCode)
      参数校验失败返回
      参数:
      exceptionCode - 错误编码
      返回:
      失败
    • getUserId

      default Long getUserId()
      获取当前id
      返回:
      userId