Class BaseManageController<E extends net.guerlab.cloud.commons.entity.IBaseEntity,Q extends net.guerlab.cloud.searchparams.SearchParams,A extends net.guerlab.cloud.commons.api.ManageApi<E,Q>,V>

java.lang.Object
net.guerlab.cloud.web.provider.BaseQueryController<E,Q,A,V>
net.guerlab.cloud.web.provider.BaseManageController<E,Q,A,V>
Type Parameters:
E - 实体类型
Q - 搜索参数类型
A - api接口类型
V - 返回对象类型

public abstract class BaseManageController<E extends net.guerlab.cloud.commons.entity.IBaseEntity,Q extends net.guerlab.cloud.searchparams.SearchParams,A extends net.guerlab.cloud.commons.api.ManageApi<E,Q>,V> extends BaseQueryController<E,Q,A,V>
基础管理控制器实现.
Author:
guer
  • Constructor Details

    • BaseManageController

      protected BaseManageController(A api)
      根据api实例创建控制器.
      Parameters:
      api - api实例
  • Method Details

    • insert

      @Log("method.insert") @PostMapping public V insert(@Validated(net.guerlab.cloud.commons.valid.InsertValid.class) @RequestBody E entity)
    • beforeInsertCheck

      protected void beforeInsertCheck(E entity)
      保存前置检查.
      Parameters:
      entity - 实体
    • updateById

      @Log("method.updateById") @PostMapping("/updateById") public V updateById(@Validated(net.guerlab.cloud.commons.valid.UpdateValid.class) @RequestBody E entity)
    • beforeUpdateCheck

      protected void beforeUpdateCheck(E entity)
      更新前置检查.
      Parameters:
      entity - 实体
    • deleteById

      @Log("method.deleteById") @DeleteMapping("/{id:\\d+}") public void deleteById(@PathVariable("id") Long id)
    • beforeDeleteCheck

      protected void beforeDeleteCheck(E entity)
      删除前置检查.
      Parameters:
      entity - 实体
    • delete

      @Log("method.delete") @DeleteMapping public void delete(@RequestBody Q searchParams)
    • beforeDelete

      protected void beforeDelete(Q searchParams)
      删除前置处理.
      Parameters:
      searchParams - 查询对象