FLYPHT pirms 2 gadiem
vecāks
revīzija
0025ab376f
4 mainītis faili ar 68 papildinājumiem un 3 dzēšanām
  1. +2
    -2
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/controller/FileDownloadController.java
  2. +0
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlanCache.java
  3. +21
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlanHelper.java
  4. +45
    -0
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlanItemProvider.java

+ 2
- 2
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/spring/controller/FileDownloadController.java Parādīt failu

@@ -41,7 +41,7 @@ public class FileDownloadController {
@RequestParam(value = "absolutePath", required = false) Boolean absolutePath,
HttpServletRequest request
) throws FileNotFoundException {
String filePath = request.getRequestURI().substring(10);
String filePath = request.getServletPath().substring(10);
return download(filePath, name, noCache,absolutePath, request);
}

@@ -91,7 +91,7 @@ public class FileDownloadController {
@RequestParam(value = "noCache", required = false) Boolean noCache,
@RequestHeader(value = "If-Modified-Since", required = false) String ifModifiedSince,
HttpServletRequest request) throws FileNotFoundException {
String filePath = request.getRequestURI().substring(11);
String filePath = request.getServletPath().substring(11);

HttpHeaders headers = new HttpHeaders();



+ 0
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlanCache.java Parādīt failu

@@ -14,7 +14,6 @@ import java.util.Set;
public class MenuPlanCache extends AbstractEntityCache<MenuPlan> {
//缓存key:按项目缓存
public final static String mk_p = "p";

public static MenuPlanCache getInstance() {
return CacheManager.getIntance().getCache(MenuPlanCache.class);
}


+ 21
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlanHelper.java Parādīt failu

@@ -0,0 +1,21 @@
package cc.smtweb.system.bpm.web.sys.user.menuPlan;

/**
* @Author: tanghp
* @Date: 2022-09-26 10:19
* @Desc: 菜单方案辅助类
*/
public class MenuPlanHelper {
/**
* 获取命中菜单方案明细ID
* @param menuId 菜单方案明细ID
* @param pageId 页面ID
* @param fullPath 带参数的路径
* @return
*/
public long findMenuId(long menuId,long pageId,String fullPath){
//

return 0L;
}
}

+ 45
- 0
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/sys/user/menuPlan/MenuPlanItemProvider.java Parādīt failu

@@ -0,0 +1,45 @@
package cc.smtweb.system.bpm.web.sys.user.menuPlan;

import cc.smtweb.framework.core.cache.SessionCacheFactory;
import cc.smtweb.framework.core.util.CommUtil;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

/**
* @Author: tanghp
* @Date: 2022-09-26 11:12
* @Desc: 菜单明细加载类
*/
public class MenuPlanItemProvider {
private volatile MenuPlanItemProvider provider;
private Map<Long, MenuPlanItem> map = new HashMap<>();
private MenuPlanItemProvider() {
}
public MenuPlanItemProvider getInstance(){
if (provider == null) {
synchronized (SessionCacheFactory.class) {
if (provider == null) {
provider = new MenuPlanItemProvider();
}
}
}
return provider;
}
// 获取菜单方案明细ID
public MenuPlanItem getMenuPlanItem(long menuId){
MenuPlanItem menuPlanItem = map.get(menuId);
if(menuPlanItem!=null)return menuPlanItem;
Collection<MenuPlan> plans = MenuPlanCache.getInstance().getAll();
if(CommUtil.isEmpty(plans))return null;
for(MenuPlan menuPlan: plans){
menuPlanItem = MenuPlanCache.getInstance().getById(menuPlan.getEntityId(),menuId);
if(menuPlanItem!=null){
map.put(menuId,menuPlanItem);
return menuPlanItem;
}
}
return null;
}
}

Notiek ielāde…
Atcelt
Saglabāt