Package top.tangyh.basic.base.controller
Class SuperReadController<S extends SuperService<Id,Entity>,Id extends Serializable,Entity extends SuperEntity<Id>,PageQuery,ResultVO>
java.lang.Object
top.tangyh.basic.base.controller.SuperSimpleController<S,Id,Entity>
top.tangyh.basic.base.controller.SuperReadController<S,Id,Entity,PageQuery,ResultVO>
- Type Parameters:
S- ServiceId- 主键Entity- 实体PageQuery- 分页参数ResultVO- 实体返回VO
- All Implemented Interfaces:
BaseController<Id,,Entity> PageController<Id,,Entity, PageQuery, ResultVO> QueryController<Id,Entity, PageQuery, ResultVO>
public abstract class SuperReadController<S extends SuperService<Id,Entity>,Id extends Serializable,Entity extends SuperEntity<Id>,PageQuery,ResultVO>
extends SuperSimpleController<S,Id,Entity>
implements QueryController<Id,Entity,PageQuery,ResultVO>
SuperReadController
继承该类,就拥有了如下方法: 1,page 分页查询,并支持子类扩展4个方法:handlerQueryParams、query、handlerWrapper、handlerResult 2,get 单体查询, 根据ID直接查询DB 3,detail 单体详情查询, 根据ID直接查询DB 4,list 列表查询,根据参数条件,查询列表
若重写扩展方法无法满足,则可以重写page、save等方法,但切记不要修改 @RequestMapping 参数
- Author:
- zuihou
-
Field Summary
FieldsFields inherited from class top.tangyh.basic.base.controller.SuperSimpleController
entityClass, superService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription获取返回VO的类型Methods inherited from class top.tangyh.basic.base.controller.SuperSimpleController
currentModelClass, getEntityClass, getSuperServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface top.tangyh.basic.base.controller.BaseController
fail, fail, fail, fail, fail, fail, getEntityClass, getSuperService, getUserId, success, success, validFail, validFail, validFailMethods inherited from interface top.tangyh.basic.base.controller.PageController
getEchoService, handlerQueryParams, handlerResult, handlerWrapper, page, queryMethods inherited from interface top.tangyh.basic.base.controller.QueryController
findByIds, get, getDetail, query
-
Field Details
-
resultVOClass
-
-
Constructor Details
-
SuperReadController
public SuperReadController()
-
-
Method Details
-
currentResultVOClass
-
getResultVOClass
Description copied from interface:PageController获取返回VO的类型- Specified by:
getResultVOClassin interfacePageController<S extends SuperService<Id,Entity>, Id extends Serializable, Entity extends SuperEntity<Id>, PageQuery> - Returns:
- 实体的类型
-