Commit e92ec0d2 by zhouhaibao

refactor(MerchantService): 修改商户权限查询方法参数结构

- 调整findMenuFunTreeReqByMerId方法参数顺序,增加accounttypeId参数
- 更新方法注释以反映新的参数结构
- 修改权限查询逻辑,使用accounttypeId进行菜单功能树查询
- 调用方传参时添加accounttypeId参数
1 parent ffa7a9aa
......@@ -2991,7 +2991,7 @@ public class MerchantService {
// 查询权限
log.info("新增商户权限查询:merchantId:{}, accountLevel:{},accounttypeId:{}", merchantId, merchantRequest.getMerchantAccountLevel(), accounttypeId);
List<AccountTypeTreeRequest> menuFunTreeReqByMerId = findMenuFunTreeReqByMerId(merchantId,
List<AccountTypeTreeRequest> menuFunTreeReqByMerId = findMenuFunTreeReqByMerId(accounttypeId,merchantId,
merchantRequest.getMerchantAccountLevel(), merchantRequest.getParentId());
if (CollectionUtils.isEmpty(menuFunTreeReqByMerId)) {
log.warn("无权限");
......@@ -3020,12 +3020,14 @@ public class MerchantService {
/**
* 根据商务id查询功能权限树
*
* @param merchantId 商务id
* @param accountlevel 商户层级
* @param parentId 父商id
* @param accounttypeId
* @param merchantId 商务id
* @param accountlevel 商户层级
* @param parentId 父商id
* @return
*/
public List<AccountTypeTreeRequest> findMenuFunTreeReqByMerId(Integer merchantId, Integer accountlevel, Integer parentId) {
public List<AccountTypeTreeRequest> findMenuFunTreeReqByMerId(List<Integer> accounttypeId,
Integer merchantId, Integer accountlevel, Integer parentId) {
List<MerchantCompareModel> permissionByMerId = new ArrayList<>();
if (merchantId == systemProperty.getManageMerchantId()) {
permissionByMerId = merchantActRelationService.findAllPermission();
......@@ -3033,7 +3035,7 @@ public class MerchantService {
if (parentId != null) {
permissionByMerId = merchantActRelationService.findPermissionByParentMerId(parentId, merchantId, accountlevel);
} else {
permissionByMerId = merchantActRelationService.findPermissionByMerId(merchantId);
permissionByMerId = merchantActRelationService.findMenuFunTreeByAccountType(accounttypeId,merchantId,accountlevel);
}
}
if (CollectionUtils.isNotEmpty(permissionByMerId)) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!