类 Y9MenuServiceImpl
- java.lang.Object
-
- net.risesoft.y9public.service.resource.impl.Y9MenuServiceImpl
-
- 所有已实现的接口:
ResourceCommonService<Y9Menu>,Y9MenuService
@Service @Transactional(value="rsPublicTransactionManager", readOnly=true) public class Y9MenuServiceImpl extends Object implements Y9MenuService- 作者:
- dingzhaojun, qinman, mengjuhua
- Date:
- 2022/2/10
-
-
构造器概要
构造器 构造器 说明 Y9MenuServiceImpl()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voiddelete(String id)删除资源voiddelete(List<String> idList)批量删除资源voiddeleteByParentId(String parentId)voiddeleteTenantRelatedByMenuId(String menuId)删除相关租户数据
切换不同的数据源 需开启新事务Y9Menudisable(String id)禁用资源List<Y9Menu>disable(List<String> idList)批量禁用资源Y9Menuenable(String id)启用资源List<Y9Menu>enable(List<String> idList)批量启用资源booleanexistsById(String id)根据id判断资源是否存在Optional<Y9Menu>findById(String id)根据id获取资源List<Y9Menu>findByNameLike(String name)根据资源名称查找资源列表List<Y9Menu>findByParentId(String parentId)根据父资源id获取其下子资源Y9MenugetById(String id)根据id获取资源IntegergetMaxIndexByParentId(String parentId)根据父节点id,获取最大排序voidonAppDeleted(net.risesoft.y9.pubsub.event.Y9EntityDeletedEvent<Y9App> event)voidonMenuDeleted(net.risesoft.y9.pubsub.event.Y9EntityDeletedEvent<Y9Menu> event)voidonTenantAppDeleted(net.risesoft.y9.pubsub.event.Y9EntityDeletedEvent<Y9TenantApp> event)Y9MenusaveOrUpdate(Y9Menu y9Menu)新增或保存资源Y9MenuupdateTabIndex(String id, int index)更新排列序号
-
-
-
方法详细资料
-
delete
@Transactional(readOnly=false) public void delete(List<String> idList)
从接口复制的说明:ResourceCommonService批量删除资源- 指定者:
delete在接口中ResourceCommonService<Y9Menu>
-
delete
@Transactional(readOnly=false) public void delete(String id)
从接口复制的说明:ResourceCommonService删除资源- 指定者:
delete在接口中ResourceCommonService<Y9Menu>
-
disable
@Transactional(readOnly=false) public List<Y9Menu> disable(List<String> idList)
从接口复制的说明:ResourceCommonService批量禁用资源- 指定者:
disable在接口中ResourceCommonService<Y9Menu>- 返回:
-
disable
@Transactional(readOnly=false) public Y9Menu disable(String id)
从接口复制的说明:ResourceCommonService禁用资源- 指定者:
disable在接口中ResourceCommonService<Y9Menu>- 返回:
-
enable
@Transactional(readOnly=false) public List<Y9Menu> enable(List<String> idList)
从接口复制的说明:ResourceCommonService批量启用资源- 指定者:
enable在接口中ResourceCommonService<Y9Menu>- 返回:
-
enable
@Transactional(readOnly=false) public Y9Menu enable(String id)
从接口复制的说明:ResourceCommonService启用资源- 指定者:
enable在接口中ResourceCommonService<Y9Menu>- 返回:
-
existsById
public boolean existsById(String id)
从接口复制的说明:ResourceCommonService根据id判断资源是否存在- 指定者:
existsById在接口中ResourceCommonService<Y9Menu>- 返回:
- 对应的资源是否存在
-
findById
public Optional<Y9Menu> findById(String id)
从接口复制的说明:ResourceCommonService根据id获取资源- 指定者:
findById在接口中ResourceCommonService<Y9Menu>- 返回:
- 资源对象
-
findByNameLike
public List<Y9Menu> findByNameLike(String name)
从接口复制的说明:ResourceCommonService根据资源名称查找资源列表- 指定者:
findByNameLike在接口中ResourceCommonService<Y9Menu>- 返回:
-
getById
public Y9Menu getById(String id)
从接口复制的说明:ResourceCommonService根据id获取资源- 指定者:
getById在接口中ResourceCommonService<Y9Menu>- 返回:
- 资源对象
-
saveOrUpdate
@Transactional(readOnly=false) public Y9Menu saveOrUpdate(Y9Menu y9Menu)
从接口复制的说明:ResourceCommonService新增或保存资源- 指定者:
saveOrUpdate在接口中ResourceCommonService<Y9Menu>- 返回:
-
updateTabIndex
public Y9Menu updateTabIndex(String id, int index)
从接口复制的说明:ResourceCommonService更新排列序号- 指定者:
updateTabIndex在接口中ResourceCommonService<Y9Menu>
-
deleteByParentId
@Transactional(readOnly=false) public void deleteByParentId(String parentId)
-
deleteTenantRelatedByMenuId
@Transactional(readOnly=false, propagation=REQUIRES_NEW) public void deleteTenantRelatedByMenuId(String menuId)删除相关租户数据
切换不同的数据源 需开启新事务- 参数:
menuId- 菜单id
-
findByParentId
public List<Y9Menu> findByParentId(String parentId)
从接口复制的说明:Y9MenuService根据父资源id获取其下子资源- 指定者:
findByParentId在接口中Y9MenuService- 返回:
-
getMaxIndexByParentId
public Integer getMaxIndexByParentId(String parentId)
从接口复制的说明:Y9MenuService根据父节点id,获取最大排序- 指定者:
getMaxIndexByParentId在接口中Y9MenuService- 返回:
-
onAppDeleted
@EventListener @Transactional(readOnly=false) public void onAppDeleted(net.risesoft.y9.pubsub.event.Y9EntityDeletedEvent<Y9App> event)
-
onMenuDeleted
@EventListener @Transactional(readOnly=false) public void onMenuDeleted(net.risesoft.y9.pubsub.event.Y9EntityDeletedEvent<Y9Menu> event)
-
onTenantAppDeleted
@EventListener @Transactional(readOnly=false) public void onTenantAppDeleted(net.risesoft.y9.pubsub.event.Y9EntityDeletedEvent<Y9TenantApp> event)
-
-