diff --git a/mybatis-flex-codegen/src/main/resources/templates/enjoy/serviceImpl.tpl b/mybatis-flex-codegen/src/main/resources/templates/enjoy/serviceImpl.tpl index edcb3693..c1669d7e 100644 --- a/mybatis-flex-codegen/src/main/resources/templates/enjoy/serviceImpl.tpl +++ b/mybatis-flex-codegen/src/main/resources/templates/enjoy/serviceImpl.tpl @@ -87,6 +87,30 @@ public class #(table.buildServiceImplClassName()) extends #(serviceImplConfig.bu return super.getOneAs(query, asType); } + @Override + @Cacheable(key = "#root.methodName + ':' + #query.toSQL()") + public Object getObj(QueryWrapper query) { + return super.getObj(query); + } + + @Override + @Cacheable(key = "#root.methodName + ':' + #query.toSQL()") + public R getObjAs(QueryWrapper query, Class asType) { + return super.getObjAs(query, asType); + } + + @Override + @Cacheable(key = "#root.methodName + ':' + #query.toSQL()") + public List objList(QueryWrapper query) { + return super.objList(query); + } + + @Override + @Cacheable(key = "#root.methodName + ':' + #query.toSQL()") + public List objListAs(QueryWrapper query, Class asType) { + return super.objListAs(query, asType); + } + @Override @Cacheable(key = "#root.methodName + ':' + #query.toSQL()") public List<#(entityClassName)> list(QueryWrapper query) {