|
@@ -57,36 +57,37 @@ public class SimpleMenuService
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @CacheEvict(cacheNames ={CacheConstants.MENU_CACHE_NAME,CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
|
|
|
+ @CacheEvict(cacheNames = {CacheConstants.MENU_CACHE_NAME, CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
|
|
|
public int updateByPk(MenuEntity entity) {
|
|
|
return super.updateByPk(entity);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @CacheEvict(cacheNames ={CacheConstants.MENU_CACHE_NAME,CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
|
|
|
+ @CacheEvict(cacheNames = {CacheConstants.MENU_CACHE_NAME, CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
|
|
|
public String saveOrUpdate(MenuEntity entity) {
|
|
|
return super.saveOrUpdate(entity);
|
|
|
}
|
|
|
+
|
|
|
@Override
|
|
|
- @CacheEvict(cacheNames ={CacheConstants.MENU_CACHE_NAME,CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
|
|
|
+ @CacheEvict(cacheNames = {CacheConstants.MENU_CACHE_NAME, CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
|
|
|
public int updateBatch(Collection<MenuEntity> data) {
|
|
|
return super.updateBatch(data);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @CacheEvict(cacheNames ={CacheConstants.MENU_CACHE_NAME,CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
|
|
|
+ @CacheEvict(cacheNames = {CacheConstants.MENU_CACHE_NAME, CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
|
|
|
public int updateByPk(String id, MenuEntity entity) {
|
|
|
return super.updateByPk(id, entity);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @CacheEvict(cacheNames ={CacheConstants.MENU_CACHE_NAME,CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
|
|
|
+ @CacheEvict(cacheNames = {CacheConstants.MENU_CACHE_NAME, CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
|
|
|
public int updateByPk(List<MenuEntity> data) {
|
|
|
return super.updateByPk(data);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @CacheEvict(cacheNames ={CacheConstants.MENU_CACHE_NAME,CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
|
|
|
+ @CacheEvict(cacheNames = {CacheConstants.MENU_CACHE_NAME, CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
|
|
|
public String insert(MenuEntity entity) {
|
|
|
if (entity.getStatus() == null) {
|
|
|
entity.setStatus((byte) 1);
|
|
@@ -95,26 +96,14 @@ public class SimpleMenuService
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @Cacheable(cacheNames =CacheConstants.MENU_CACHE_NAME,key = "'ids:'+(#id==null?'0':#id.hashCode())")
|
|
|
+ @Cacheable(cacheNames = CacheConstants.MENU_CACHE_NAME, key = "'ids:'+(#id==null?'0':#id.hashCode())")
|
|
|
public List<MenuEntity> selectByPk(List<String> id) {
|
|
|
return super.selectByPk(id);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @CacheEvict(cacheNames ={CacheConstants.MENU_CACHE_NAME,CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
|
|
|
+ @CacheEvict(cacheNames = {CacheConstants.MENU_CACHE_NAME, CacheConstants.USER_MENU_CACHE_NAME}, allEntries = true)
|
|
|
public int deleteByPk(String id) {
|
|
|
return super.deleteByPk(id);
|
|
|
}
|
|
|
-
|
|
|
- @Override
|
|
|
- @Cacheable(cacheNames =CacheConstants.MENU_CACHE_NAME,key = "'permission-ids:'+(#permissionId==null?'0':#permissionId.hashCode())")
|
|
|
- public List<MenuEntity> getByPermissionId(List<String> permissionId) {
|
|
|
- return createQuery().noPaging().where().in("permissionId", permissionId).list();
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- @Cacheable(cacheNames =CacheConstants.MENU_CACHE_NAME,key = "'permission-id:'+#permissionId")
|
|
|
- public MenuEntity getByPermissionId(String permissionId) {
|
|
|
- return createQuery().noPaging().where().is("permissionId", permissionId).single();
|
|
|
- }
|
|
|
}
|