|
|
@ -1,9 +1,7 @@
|
|
|
|
package ${domain}.frame.auth;
|
|
|
|
package ${domain}.frame.auth;
|
|
|
|
|
|
|
|
|
|
|
|
<#if project.frameValue() = 1>
|
|
|
|
|
|
|
|
import ${domain}.module.wsys.ent.Res;
|
|
|
|
import ${domain}.module.wsys.ent.Res;
|
|
|
|
import ${domain}.module.wsys.mgr.ResManager;
|
|
|
|
import ${domain}.module.wsys.mgr.ResManager;
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
import java.io.Serializable;
|
|
|
|
import java.util.HashSet;
|
|
|
|
import java.util.HashSet;
|
|
|
@ -43,7 +41,6 @@ public class Token implements Serializable {
|
|
|
|
private Set<String> resSet = new HashSet<>();
|
|
|
|
private Set<String> resSet = new HashSet<>();
|
|
|
|
|
|
|
|
|
|
|
|
public boolean hasRes(String res) {
|
|
|
|
public boolean hasRes(String res) {
|
|
|
|
<#if project.frameValue() = 1>
|
|
|
|
|
|
|
|
{// todo 开发初期收集资源,后期删除
|
|
|
|
{// todo 开发初期收集资源,后期删除
|
|
|
|
String active = LocalData.getActive();
|
|
|
|
String active = LocalData.getActive();
|
|
|
|
if (active.contains("dev")) {//测试环境捕获资源
|
|
|
|
if (active.contains("dev")) {//测试环境捕获资源
|
|
|
@ -51,7 +48,6 @@ public class Token implements Serializable {
|
|
|
|
resManager.saveRes(res, LocalData.getSysToken());
|
|
|
|
resManager.saveRes(res, LocalData.getSysToken());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (String s : resSet) {
|
|
|
|
for (String s : resSet) {
|
|
|
|
if (res.matches(s)) {
|
|
|
|
if (res.matches(s)) {
|
|
|
@ -69,7 +65,6 @@ public class Token implements Serializable {
|
|
|
|
public void putRes(Set<String> resourceSet) {
|
|
|
|
public void putRes(Set<String> resourceSet) {
|
|
|
|
this.resSet.addAll(resourceSet);
|
|
|
|
this.resSet.addAll(resourceSet);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
<#if project.frameValue() = 1>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void putRes(List<Res> resList) {
|
|
|
|
public void putRes(List<Res> resList) {
|
|
|
|
if (resList == null) return;
|
|
|
|
if (resList == null) return;
|
|
|
@ -77,7 +72,6 @@ public class Token implements Serializable {
|
|
|
|
this.resSet.add(res.getResValue());
|
|
|
|
this.resSet.add(res.getResValue());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Set<String> getResSet() {
|
|
|
|
public Set<String> getResSet() {
|
|
|
|
return resSet;
|
|
|
|
return resSet;
|
|
|
|