提交 1a9424de 编写于 作者: sq3536's avatar sq3536

修复

上级 3dd64b5f
/**
* 视图对象参数
*
* @export
* @interface ViewDetail
*/
export interface ViewDetail {
/**
* 视图名称
*
* @type {string}
* @memberof ViewDetail
*/
name: string;
/**
* 代码名称
*
* @type {string}
* @memberof ViewDetail
*/
codeName: string;
/**
* 视图宽度
*
* @type {number}
* @memberof ViewDetail
*/
width?: number;
/**
* 视图高度
*
* @type {number}
* @memberof ViewDetail
*/
height?: number;
/**
* 视图标题
*
* @type {string}
* @memberof ViewDetail
*/
title?: string;
/**
* 打开方式
*
* @type {string}
* @memberof ViewDetail
*/
openMode?: 'INDEXViewDetailTAB' | 'POPUPAPP' | 'POPUPMODAL' | 'DRAWER' | 'POPOVER' | string;
/**
* 重定向视图
*
* @type {boolean}
* @memberof ViewDetail
*/
redirectView?: boolean;
/**
* 关系路径
*
* @type {[]}
* @memberof ViewDetail
*/
deResPaths?: [];
/**
* 标题
*
* @type {string}
* @memberof ViewDetail
*/
caption?: string;
/**
* 视图类型
*
* @type {string}
* @memberof ViewDetail
*/
ViewDetailType?: string;
/**
* 文件路径
*
* @type {string}
* @memberof ViewDetail
*/
fileDir?: string;
}
\ No newline at end of file
...@@ -117,17 +117,29 @@ public class AppEntityModel extends BaseModel{ ...@@ -117,17 +117,29 @@ public class AppEntityModel extends BaseModel{
return app.getSystem().getEntity(getAppDataEntity().getPSDataEntity().getCodeName()); return app.getSystem().getEntity(getAppDataEntity().getPSDataEntity().getCodeName());
} }
private String serviceId;
public String getServiceId() public String getServiceId()
{ {
String sybSysServiceType="DEFAULT"; if(serviceId==null)
if(getEntity().getDataEntity().getPSSubSysServiceAPI()!=null) {
sybSysServiceType=getEntity().getDataEntity().getPSSubSysServiceAPI().getServiceType(); String sybSysServiceType="DEFAULT";
if(getEntity().getDataEntity().getStorageMode()==4 && (!"MIDDLEPLATFORM".equals(sybSysServiceType)) && (!"MASA".equals(sybSysServiceType))) if(getEntity().getDataEntity().getPSSubSysServiceAPI()!=null)
return getEntity().getDataEntity().getPSSubSysServiceAPI().getServiceCodeName(); sybSysServiceType=getEntity().getDataEntity().getPSSubSysServiceAPI().getServiceType();
else if (getAppDataEntity().getPSSysServiceAPI()!=null) if(getEntity().getDataEntity().getStorageMode()==4 && (!"MIDDLEPLATFORM".equals(sybSysServiceType)) && (!"MASA".equals(sybSysServiceType)))
return app.getSystem().getProjectName()+"-"+ getAppDataEntity().getPSSysServiceAPI().getCodeName().toLowerCase(); serviceId = getEntity().getDataEntity().getPSSubSysServiceAPI().getServiceCodeName();
else else if (getAppDataEntity().getPSSysServiceAPI()!=null)
return null; serviceId = app.getSystem().getProjectName()+"-"+ getAppDataEntity().getPSSysServiceAPI().getCodeName().toLowerCase();
}
return serviceId;
}
public String getRefServiceId() {
if (getServiceId() != null)
{
return "${ibiz.ref.service."+serviceId+":"+serviceId+"}";
}
return null;
} }
public Collection<CtrlModel> getCtrls() public Collection<CtrlModel> getCtrls()
......
...@@ -7,6 +7,7 @@ import lombok.NoArgsConstructor; ...@@ -7,6 +7,7 @@ import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import net.ibizsys.model.app.IPSApplication; import net.ibizsys.model.app.IPSApplication;
import org.springframework.util.StringUtils;
import java.util.*; import java.util.*;
...@@ -123,4 +124,23 @@ public class AppModel extends BaseModel{ ...@@ -123,4 +124,23 @@ public class AppModel extends BaseModel{
return new ArrayList<>(); return new ArrayList<>();
} }
private Set<String> refServiceIds;
public Set<String> getRefServiceIds()
{
if(refServiceIds==null)
{
refServiceIds=new HashSet<>();
getAppEntities().forEach(appEntityModel -> {
String serviceId=appEntityModel.getServiceId();
if(!StringUtils.isEmpty(serviceId))
{
refServiceIds.add(serviceId);
}
});
}
return refServiceIds;
}
} }
#eureka配置中心
spring:
cloud:
nacos:
discovery:
enabled: false
eureka:
client:
enabled: true
serviceUrl:
defaultZone: http://127.0.0.1:8762/eureka/
\ No newline at end of file
#nacos配置中心
spring:
cloud:
nacos:
discovery:
server-addr: 172.16.100.77:8848
enabled: true
eureka:
client:
enabled: false
\ No newline at end of file
...@@ -52,6 +52,7 @@ ribbon: ...@@ -52,6 +52,7 @@ ribbon:
#缓存级别:无缓存(无配置项)、一级缓存(L1)、二级缓存(L2) #缓存级别:无缓存(无配置项)、一级缓存(L1)、二级缓存(L2)
ibiz: ibiz:
systemid: {{system.codeName}} systemid: {{system.codeName}}
systemname: {{system.logicName}}
enablePermissionValid: true enablePermissionValid: true
cacheLevel: L1 #(L1)一级本地caffeine缓存;(L2)caffeine缓存+Redis缓存 cacheLevel: L1 #(L1)一级本地caffeine缓存;(L2)caffeine缓存+Redis缓存
...@@ -134,7 +135,7 @@ zuul: ...@@ -134,7 +135,7 @@ zuul:
{{#serviceId}} {{#serviceId}}
{{lowerCase app.codeName}}-{{lowerCase codeName}}: {{lowerCase app.codeName}}-{{lowerCase codeName}}:
path: /{{pluralize codeName}}/** path: /{{pluralize codeName}}/**
serviceId: ${ ibiz.ref.service.{{serviceId}}:{{serviceId}} } serviceId: {{refServiceId}}
stripPrefix: false stripPrefix: false
{{/serviceId}} {{/serviceId}}
{{/each}} {{/each}}
......
...@@ -14,6 +14,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; ...@@ -14,6 +14,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.springframework.util.DigestUtils; import org.springframework.util.DigestUtils;
import java.io.InputStream; import java.io.InputStream;
import java.util.*; import java.util.*;
...@@ -26,10 +27,10 @@ import java.util.*; ...@@ -26,10 +27,10 @@ import java.util.*;
@ConditionalOnProperty( name = "ibiz.enablePermissionValid", havingValue = "true") @ConditionalOnProperty( name = "ibiz.enablePermissionValid", havingValue = "true")
public class PermissionSyncJob implements ApplicationRunner { public class PermissionSyncJob implements ApplicationRunner {
@Value("${ ibiz.systemid:{{system.getCodeName}} }") @Value("${ibiz.systemid}")
private String systemId; private String systemId;
@Value("${ ibiz.systemname:{{system.getName}} }") @Value("${ibiz.systemname}")
private String systemName; private String systemName;
@Autowired @Autowired
...@@ -67,8 +68,8 @@ public class PermissionSyncJob implements ApplicationRunner { ...@@ -67,8 +68,8 @@ public class PermissionSyncJob implements ApplicationRunner {
if (!ObjectUtils.isEmpty(permission)) { if (!ObjectUtils.isEmpty(permission)) {
String strPermission = IOUtils.toString(permission, "UTF-8"); String strPermission = IOUtils.toString(permission, "UTF-8");
JSONObject system = new JSONObject(); JSONObject system = new JSONObject();
system.put("pssystemid", systemId); system.put("pssystemid", StringUtils.isEmpty(systemId)?"{{system.codeName}}":systemId);
system.put("pssystemname", systemName); system.put("pssystemname", StringUtils.isEmpty(systemName)?"{{system.logicName}}":systemName);
system.put("sysstructure", JSONObject.parseObject(strPermission)); system.put("sysstructure", JSONObject.parseObject(strPermission));
system.put("md5check", DigestUtils.md5DigestAsHex(strPermission.getBytes())); system.put("md5check", DigestUtils.md5DigestAsHex(strPermission.getBytes()));
if (uaaClient.syncSysAuthority(system)) { if (uaaClient.syncSysAuthority(system)) {
...@@ -82,7 +83,7 @@ public class PermissionSyncJob implements ApplicationRunner { ...@@ -82,7 +83,7 @@ public class PermissionSyncJob implements ApplicationRunner {
} }
try { try {
InputStream model = this.getClass().getResourceAsStream("/sysmodel/${sys.codeName}.json"); //系统模型 InputStream model = this.getClass().getResourceAsStream("/sysmodel/{{system.codeName}}.json"); //系统模型
if (!ObjectUtils.isEmpty(model)) { if (!ObjectUtils.isEmpty(model)) {
String strModel = IOUtils.toString(model, "UTF-8"); String strModel = IOUtils.toString(model, "UTF-8");
if (liteClient.syncSysModel(JSONObject.parseObject(strModel))) { if (liteClient.syncSysModel(JSONObject.parseObject(strModel))) {
......
...@@ -187,6 +187,7 @@ ribbon: ...@@ -187,6 +187,7 @@ ribbon:
#缓存级别:无缓存(无配置项)、一级缓存(L1)、二级缓存(L2) #缓存级别:无缓存(无配置项)、一级缓存(L1)、二级缓存(L2)
ibiz: ibiz:
systemid: {{system.codeName}} systemid: {{system.codeName}}
systemname: {{system.logicName}}
enablePermissionValid: true enablePermissionValid: true
cacheLevel: L1 #(L1)一级本地caffeine缓存;(L2)caffeine缓存+Redis缓存 cacheLevel: L1 #(L1)一级本地caffeine缓存;(L2)caffeine缓存+Redis缓存
{{#eq system.saaSMode 4}} {{#eq system.saaSMode 4}}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册