fix: code & vm
This commit is contained in:
@@ -6,8 +6,8 @@ import com.starry.admin.utils.SecurityUtils;
|
||||
import com.starry.common.utils.StringUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sf.jsqlparser.expression.Expression;
|
||||
import net.sf.jsqlparser.expression.LongValue;
|
||||
import net.sf.jsqlparser.expression.NullValue;
|
||||
import net.sf.jsqlparser.expression.StringValue;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Arrays;
|
||||
@@ -38,7 +38,7 @@ public class MyTenantLineHandler implements TenantLineHandler {
|
||||
if (StrUtil.isBlankIfStr(tenantId)) {
|
||||
return new NullValue();
|
||||
}
|
||||
return new LongValue(tenantId);
|
||||
return new StringValue(tenantId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,10 +15,8 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -135,6 +133,9 @@ public class SysMenuController {
|
||||
public R getSimpleMenus() {
|
||||
// 获得菜单列表,只要开启状态的
|
||||
List<SimpleMenu> menus = menuService.selectSimpleMenuList();
|
||||
//TODO 移除公共模块
|
||||
List<Long> forbidList = Arrays.asList(26L, 48L, 47L, 19L);
|
||||
List<SimpleMenu> menuList = menus.stream().filter(ca -> !forbidList.contains(ca.getId()) || !forbidList.contains(ca.getParentId())).collect(Collectors.toList());
|
||||
return R.ok(menus);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user