Merge branch 'feature/TJ_permission_menu' into 'master'
Feature/tj permission menu See merge request universal/infrastructure/backend/tyr!16
This commit is contained in:
commit
0ac6eecde7
@ -54,4 +54,19 @@ public interface PermissionPointApi {
|
|||||||
/** 查询权限点列表 - 不组装树形结构 **/
|
/** 查询权限点列表 - 不组装树形结构 **/
|
||||||
@PostMapping(value = "/api/v1/permissionPoint/queryList")
|
@PostMapping(value = "/api/v1/permissionPoint/queryList")
|
||||||
ApiResult<List<PermissionPointTreeNode>> queryList(@RequestBody PermissionPointListQueryRequest request);
|
ApiResult<List<PermissionPointTreeNode>> queryList(@RequestBody PermissionPointListQueryRequest request);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据权限点code查询详情
|
||||||
|
**/
|
||||||
|
@GetMapping(value = "/api/v1/permissionPoint/getByCode/{code}")
|
||||||
|
ApiResult<List<PermissionPointDTO>> getDetailByCode(@PathVariable String code);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据权限点Id获取子节点
|
||||||
|
**/
|
||||||
|
@GetMapping(value = "/api/v1/permissionPoint/getChildByParentId/{id}")
|
||||||
|
ApiResult<List<PermissionPointDTO>> getChildByParentId(@PathVariable Long id);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,4 +68,16 @@ public class PermissionPointController implements PermissionPointApi {
|
|||||||
public ApiResult<List<PermissionPointTreeNode>> queryList(PermissionPointListQueryRequest request) {
|
public ApiResult<List<PermissionPointTreeNode>> queryList(PermissionPointListQueryRequest request) {
|
||||||
return ApiResult.ok(permissionPointService.queryList(request));
|
return ApiResult.ok(permissionPointService.queryList(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApiResult<List<PermissionPointDTO>> getDetailByCode(String code) {
|
||||||
|
return ApiResult.ok(permissionPointService.getDetailByCode(code));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApiResult<List<PermissionPointDTO>> getChildByParentId(Long id) {
|
||||||
|
return ApiResult.ok(permissionPointService.getChildByParentId(id));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,4 +25,9 @@ public interface SaasFeatureDao extends IService<SaasFeature> {
|
|||||||
|
|
||||||
List<SaasFeature> listByParentIdAndTerminal(Long parentId, String terminal);
|
List<SaasFeature> listByParentIdAndTerminal(Long parentId, String terminal);
|
||||||
|
|
||||||
|
List<SaasFeature> listByCode(String code);
|
||||||
|
|
||||||
|
|
||||||
|
List<SaasFeature> getChildByParentId(Long parentId);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1,5 +1,7 @@
|
|||||||
package cn.axzo.tyr.server.repository.dao.impl;
|
package cn.axzo.tyr.server.repository.dao.impl;
|
||||||
|
|
||||||
|
import cn.axzo.basics.common.constant.enums.TableIsDeleteEnum;
|
||||||
|
import cn.axzo.pokonyan.config.mybatisplus.BaseEntity;
|
||||||
import cn.axzo.tyr.server.repository.dao.SaasFeatureDao;
|
import cn.axzo.tyr.server.repository.dao.SaasFeatureDao;
|
||||||
import cn.axzo.tyr.server.repository.entity.SaasFeature;
|
import cn.axzo.tyr.server.repository.entity.SaasFeature;
|
||||||
import cn.axzo.tyr.server.repository.mapper.SaasFeatureMapper;
|
import cn.axzo.tyr.server.repository.mapper.SaasFeatureMapper;
|
||||||
@ -48,4 +50,14 @@ public class SaasFeatureDaoImpl extends ServiceImpl<SaasFeatureMapper, SaasFeatu
|
|||||||
.eq(SaasFeature::getTerminal, terminal));
|
.eq(SaasFeature::getTerminal, terminal));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SaasFeature> listByCode(String code) {
|
||||||
|
return this.lambdaQuery().in(SaasFeature::getFeatureCode, code).list();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SaasFeature> getChildByParentId(Long parentId) {
|
||||||
|
return lambdaQuery().eq(SaasFeature::getParentId,parentId)
|
||||||
|
.eq(BaseEntity::getIsDelete,TableIsDeleteEnum.NORMAL).list();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -55,4 +55,17 @@ public interface PermissionPointService {
|
|||||||
|
|
||||||
/** 根据code查询权限点, terminal可为空 **/
|
/** 根据code查询权限点, terminal可为空 **/
|
||||||
List<SaasFeature> listNodeWithChildrenByCode(String featureCode, String terminal);
|
List<SaasFeature> listNodeWithChildrenByCode(String featureCode, String terminal);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据CODE查询详情
|
||||||
|
* @param code
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PermissionPointDTO> getDetailByCode(String code);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param parentId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PermissionPointDTO> getChildByParentId(Long parentId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -586,4 +586,18 @@ public class PermissionPointServiceImpl implements PermissionPointService {
|
|||||||
currentFeatrureList.addAll(children);
|
currentFeatrureList.addAll(children);
|
||||||
return currentFeatrureList;
|
return currentFeatrureList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PermissionPointDTO> getDetailByCode(String code) {
|
||||||
|
List<SaasFeature> feature = saasFeatureDao.listByCode(code);
|
||||||
|
return BeanMapper.copyList(feature, PermissionPointDTO.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PermissionPointDTO> getChildByParentId(Long parentId) {
|
||||||
|
List<SaasFeature> feature = saasFeatureDao.getChildByParentId(parentId);
|
||||||
|
return BeanMapper.copyList(feature, PermissionPointDTO.class);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package cn.axzo.tyr.server.service.impl;
|
|||||||
|
|
||||||
import cn.axzo.basics.common.BeanMapper;
|
import cn.axzo.basics.common.BeanMapper;
|
||||||
import cn.axzo.framework.domain.web.result.ApiResult;
|
import cn.axzo.framework.domain.web.result.ApiResult;
|
||||||
|
import cn.axzo.pokonyan.config.mybatisplus.BaseEntity;
|
||||||
import cn.axzo.thrones.client.saas.ServicePkgClient;
|
import cn.axzo.thrones.client.saas.ServicePkgClient;
|
||||||
import cn.axzo.thrones.client.saas.entity.serivicepgkproduct.ServicePkgProduct;
|
import cn.axzo.thrones.client.saas.entity.serivicepgkproduct.ServicePkgProduct;
|
||||||
import cn.axzo.thrones.client.saas.entity.servicepkg.ServicePkgDetailRes;
|
import cn.axzo.thrones.client.saas.entity.servicepkg.ServicePkgDetailRes;
|
||||||
@ -93,6 +94,11 @@ public class ProductFeatureRelationServiceImpl implements ProductFeatureRelation
|
|||||||
@Override
|
@Override
|
||||||
public ApiResult<List<ProductFeatureRelationVO>> featureListByProduct(List<Long> productIds) {
|
public ApiResult<List<ProductFeatureRelationVO>> featureListByProduct(List<Long> productIds) {
|
||||||
List<SaasProductModuleFeatureRelation> list = saasProductModuleFeatureRelationDao.lambdaQuery()
|
List<SaasProductModuleFeatureRelation> list = saasProductModuleFeatureRelationDao.lambdaQuery()
|
||||||
|
.select(SaasProductModuleFeatureRelation::getFeatureId
|
||||||
|
,SaasProductModuleFeatureRelation::getProductModuleId
|
||||||
|
,SaasProductModuleFeatureRelation::getDictCode
|
||||||
|
,SaasProductModuleFeatureRelation::getDictCodeId
|
||||||
|
, BaseEntity::getId)
|
||||||
.in(SaasProductModuleFeatureRelation::getProductModuleId, productIds)
|
.in(SaasProductModuleFeatureRelation::getProductModuleId, productIds)
|
||||||
.list();
|
.list();
|
||||||
return ApiResult.ok(BeanMapper.copyList(list, ProductFeatureRelationVO.class));
|
return ApiResult.ok(BeanMapper.copyList(list, ProductFeatureRelationVO.class));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user