提交 66bbdf2c 编写于 作者: sq3536's avatar sq3536

appnav

上级 2cf559f0
...@@ -42,12 +42,15 @@ public class SysAppService extends SysAppServiceImpl ...@@ -42,12 +42,15 @@ public class SysAppService extends SysAppServiceImpl
private UAACoreService uaaCoreService; private UAACoreService uaaCoreService;
@Cacheable( value="ibzuaa_appnavbar",key = "'id:'+#p0+'||'+#p1") @Cacheable( value="ibzuaa_switcher",key = "'id:'+#p0+'||'+#p1")
public JSONObject getAppNavigationBar(String navId,String userId) public JSONObject getAppSwitcher(String id,String userId)
{ {
JSONObject jo=ibzConfigService.getConfig("AppNavigationBar",navId, userId); JSONObject jo=ibzConfigService.getConfig("AppSwitcher",id, userId);
if(!jo.containsKey("model")) boolean nullSwitcher=false;
jo.put("model",new JSONArray()); if(!jo.containsKey("model")) {
jo.put("model", new JSONArray());
nullSwitcher=true;
}
LinkedHashMap<String,SysApp> defApps=uaaCoreService.getApps(); LinkedHashMap<String,SysApp> defApps=uaaCoreService.getApps();
List<SysApp> list=new ArrayList<>(); List<SysApp> list=new ArrayList<>();
JSONArray.parseArray(jo.get("model").toString(),SysApp.class).forEach(sysApp -> { JSONArray.parseArray(jo.get("model").toString(),SysApp.class).forEach(sysApp -> {
...@@ -58,11 +61,16 @@ public class SysAppService extends SysAppServiceImpl ...@@ -58,11 +61,16 @@ public class SysAppService extends SysAppServiceImpl
sysApp.setFullname(def.getFullname()); sysApp.setFullname(def.getFullname());
sysApp.setType(def.getType()); sysApp.setType(def.getType());
sysApp.setVisabled(1); sysApp.setVisabled(1);
sysApp.setGroup(def.getGroup());
list.add(sysApp); list.add(sysApp);
defApps.remove(def.getId()); defApps.remove(def.getId());
}); });
final boolean flag=nullSwitcher;
defApps.values().forEach(sysApp -> { defApps.values().forEach(sysApp -> {
sysApp.setVisabled(0); if(flag&&id.equalsIgnoreCase("default"))
sysApp.setVisabled(1);
else
sysApp.setVisabled(0);
list.add(sysApp); list.add(sysApp);
}); });
jo.remove("model"); jo.remove("model");
...@@ -70,7 +78,7 @@ public class SysAppService extends SysAppServiceImpl ...@@ -70,7 +78,7 @@ public class SysAppService extends SysAppServiceImpl
return jo; return jo;
} }
@CacheEvict( value="ibzuaa_appnavbar",allEntries=true) @CacheEvict( value="ibzuaa_switcher",allEntries=true)
public void resetAppNavigationBars() public void resetAppNavigationBars()
{ {
......
...@@ -14,6 +14,11 @@ ...@@ -14,6 +14,11 @@
</resultMap> </resultMap>
<select id="searchPick" parameterType="cn.ibizlab.core.uaa.filter.SysPSSystemSearchContext" >
SELECT t1.PSSYSTEMID,t1.SHOWORDER FROM IBZPSSYSTEM t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据集合[Default]--> <!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.core.uaa.filter.SysPSSystemSearchContext" resultMap="SysPSSystemResultMap"> <select id="searchDefault" parameterType="cn.ibizlab.core.uaa.filter.SysPSSystemSearchContext" resultMap="SysPSSystemResultMap">
......
...@@ -71,10 +71,10 @@ public class ClientAuthenticationResource ...@@ -71,10 +71,10 @@ public class ClientAuthenticationResource
@Autowired @Autowired
private SysAppService sysAppService; private SysAppService sysAppService;
@GetMapping(value = "uaa/access-center/nav/{id}") @GetMapping(value = "uaa/access-center/app-switcher/{id}")
public ResponseEntity<JSONObject> appnavbar(@PathVariable("id") String id) public ResponseEntity<JSONObject> appswitcher(@PathVariable("id") String id)
{ {
return ResponseEntity.ok(sysAppService.getAppNavigationBar(id,AuthenticationUser.getAuthenticationUser().getUserid())); return ResponseEntity.ok(sysAppService.getAppSwitcher(id,AuthenticationUser.getAuthenticationUser().getUserid()));
} }
} }
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册