Package top.tangyh.basic.base.controller
Class SuperCacheController<S extends SuperCacheService<Id,Entity>,Id extends Serializable,Entity extends SuperEntity<Id>,SaveVO,UpdateVO,PageQuery,ResultVO>
java.lang.Object
top.tangyh.basic.base.controller.SuperSimpleController<S,Id,Entity>
top.tangyh.basic.base.controller.SuperController<S,Id,Entity,SaveVO,UpdateVO,PageQuery,ResultVO>
top.tangyh.basic.base.controller.SuperCacheController<S,Id,Entity,SaveVO,UpdateVO,PageQuery,ResultVO>
- Type Parameters:
PageQuery- 查询参数ResultVO- 返回对象SaveVO- 保存参数UpdateVO- 修改参数S- ServiceId- 主键Entity- 实体
- All Implemented Interfaces:
BaseController<Id,,Entity> DeleteController<Id,,Entity> PageController<Id,,Entity, PageQuery, ResultVO> QueryController<Id,,Entity, PageQuery, ResultVO> SaveController<Id,,Entity, SaveVO> UpdateController<Id,Entity, UpdateVO>
public abstract class SuperCacheController<S extends SuperCacheService<Id,Entity>,Id extends Serializable,Entity extends SuperEntity<Id>,SaveVO,UpdateVO,PageQuery,ResultVO>
extends SuperController<S,Id,Entity,SaveVO,UpdateVO,PageQuery,ResultVO>
SuperCacheController
继承该类,在SuperController类的基础上扩展了以下方法: 1,get : 根据ID查询缓存,若缓存不存在,则查询DB
- Author:
- zuihou
-
Field Summary
Fields inherited from class top.tangyh.basic.base.controller.SuperController
resultVOClassFields inherited from class top.tangyh.basic.base.controller.SuperSimpleController
entityClass, superService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclearCache(List<Long> ids) 清理缓存查询获取ServicerefreshCache(List<Long> ids) 刷新缓存Methods inherited from class top.tangyh.basic.base.controller.SuperController
currentResultVOClass, getResultVOClassMethods inherited from class top.tangyh.basic.base.controller.SuperSimpleController
currentModelClass, getEntityClassMethods 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, getUserId, success, success, validFail, validFail, validFailMethods inherited from interface top.tangyh.basic.base.controller.DeleteController
delete, handlerDeleteMethods 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, getDetail, queryMethods inherited from interface top.tangyh.basic.base.controller.SaveController
copy, handlerSave, saveMethods inherited from interface top.tangyh.basic.base.controller.UpdateController
handlerUpdate, update
-
Constructor Details
-
SuperCacheController
public SuperCacheController()
-
-
Method Details
-
getSuperService
Description copied from interface:BaseController获取Service- Specified by:
getSuperServicein interfaceBaseController<S extends SuperCacheService<Id,Entity>, Id extends Serializable> - Overrides:
getSuperServicein classSuperSimpleController<S extends SuperCacheService<Id,Entity>, Id extends Serializable, Entity extends SuperEntity<Id>> - Returns:
- Service
-
get
查询- Parameters:
id- 主键id- Returns:
- 查询结果
-
refreshCache
@PostMapping("refreshCache") @WebLog("\u5237\u65b0\u7f13\u5b58") public R<Boolean> refreshCache(@RequestBody List<Long> ids) 刷新缓存- Returns:
- 是否成功
-
clearCache
@PostMapping("clearCache") @WebLog("\u6e05\u7406\u7f13\u5b58") public R<Boolean> clearCache(@RequestBody List<Long> ids) 清理缓存- Returns:
- 是否成功
-