Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzlite
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzlite
提交
fc046a0a
提交
fc046a0a
编写于
10月 23, 2020
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
repair
上级
ae23a367
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
83 行增加
和
25 行删除
+83
-25
DevNamingRegister.java
.../src/main/java/cn/ibizlab/devsimul/DevNamingRegister.java
+57
-0
application-boot.yml
ibzlite-boot/src/main/resources/application-boot.yml
+0
-4
SysModel.java
...java/cn/ibizlab/core/lite/extensions/domain/SysModel.java
+25
-4
LiteCoreService.java
...ibizlab/core/lite/extensions/service/LiteCoreService.java
+1
-1
20200601200530_init_ibzcfg.xml
...ources/liquibase/changelog/20200601200530_init_ibzcfg.xml
+0
-16
未找到文件。
ibzlite-boot/src/main/java/cn/ibizlab/devsimul/DevNamingRegister.java
0 → 100644
浏览文件 @
fc046a0a
package
cn
.
ibizlab
.
devsimul
;
import
com.alibaba.nacos.api.naming.NamingFactory
;
import
com.alibaba.nacos.api.naming.NamingService
;
import
com.alibaba.nacos.api.naming.pojo.Instance
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.ApplicationArguments
;
import
org.springframework.boot.ApplicationRunner
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.StringUtils
;
import
java.util.Properties
;
@Slf4j
@Component
public
class
DevNamingRegister
implements
ApplicationRunner
{
@Value
(
"${spring.cloud.nacos.discovery.server-addr:127.0.0.1:8848}"
)
private
String
serverAddr
;
@Value
(
"${spring.application.name:ibzlite}"
)
private
String
serviceName
;
@Value
(
"${server.port:8080}"
)
private
Integer
port
;
@Value
(
"${ibiz.ref.service.lite:ibzlite-api}"
)
private
String
liteapi
;
@Value
(
"${spring.cloud.nacos.discovery.group:DEFAULT_GROUP}"
)
private
String
group
;
@Override
public
void
run
(
ApplicationArguments
args
)
{
try
{
Thread
.
sleep
(
10000
);
Properties
properties
=
new
Properties
();
properties
.
setProperty
(
"serverAddr"
,
serverAddr
);
NamingService
naming
=
NamingFactory
.
createNamingService
(
properties
);
Instance
instance
=
naming
.
selectOneHealthyInstance
(
serviceName
,
group
);
if
(
instance
!=
null
&&(!
StringUtils
.
isEmpty
(
instance
.
getIp
())))
{
naming
.
registerInstance
(
liteapi
,
group
,
instance
);
}
}
catch
(
Exception
ex
)
{
log
.
error
(
String
.
format
(
"开发模式模拟微服务注册失败:"
,
ex
));
}
}
}
\ No newline at end of file
ibzlite-boot/src/main/resources/application-boot.yml
浏览文件 @
fc046a0a
...
@@ -8,7 +8,3 @@ spring:
...
@@ -8,7 +8,3 @@ spring:
nacos
:
nacos
:
discovery
:
discovery
:
server-addr
:
127.0.0.1:8848
server-addr
:
127.0.0.1:8848
ibiz
:
ref
:
service
:
lite
:
ibzlite
\ No newline at end of file
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/domain/SysModel.java
浏览文件 @
fc046a0a
package
cn
.
ibizlab
.
core
.
lite
.
extensions
.
domain
;
package
cn
.
ibizlab
.
core
.
lite
.
extensions
.
domain
;
import
cn.ibizlab.core.lite.domain.MetaEntity
;
import
cn.ibizlab.core.lite.domain.MetaField
;
import
cn.ibizlab.core.lite.domain.MetaField
;
import
cn.ibizlab.core.lite.domain.MetaRelationship
;
import
cn.ibizlab.core.lite.domain.MetaRelationship
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -24,24 +25,44 @@ public class SysModel {
...
@@ -24,24 +25,44 @@ public class SysModel {
Set
<
MetaField
>
fields
=
new
HashSet
<>();
Set
<
MetaField
>
fields
=
new
HashSet
<>();
this
.
entities
.
forEach
(
entityNode
->{
this
.
entities
.
forEach
(
entityNode
->{
List
<
MetaField
>
deField
=
entityNode
.
getFields
();
List
<
MetaField
>
deField
=
entityNode
.
getFields
();
MetaEntity
metaEntity
=
new
MetaEntity
();
metaEntity
.
setSystemId
(
entityNode
.
getSystemId
());
metaEntity
.
setEntityName
(
entityNode
.
getEntityName
());
metaEntity
.
setCodeName
(
entityNode
.
getCodeName
());
if
(!
ObjectUtils
.
isEmpty
(
deField
)){
if
(!
ObjectUtils
.
isEmpty
(
deField
)){
deField
.
forEach
(
field
->{
for
(
int
i
=
0
;
i
<
deField
.
size
();
i
++)
{
MetaField
field
=
deField
.
get
(
i
);
if
(
field
.
getShowOrder
()==
null
)
field
.
setShowOrder
(
1000
+
i
);
String
refDEId
=
""
;
String
refDEId
=
""
;
String
refFieldId
=
""
;
String
refFieldId
=
""
;
String
curDEId
=
DigestUtils
.
md5DigestAsHex
(
String
.
format
(
"%s||%s"
,
systemid
,
entityNode
.
getEntityName
()).
getBytes
());
String
curDEId
=
DigestUtils
.
md5DigestAsHex
(
String
.
format
(
"%s||%s"
,
systemid
,
entityNode
.
getEntityName
()).
getBytes
());
Object
refDEName
=
field
.
get
(
"ref_de"
);
Object
refDEName
=
field
.
get
(
"ref_de"
);
Object
refFieldName
=
field
.
getRefFieldName
();
String
refFieldName
=
field
.
getRefFieldName
();
Object
relationCodeName
=
field
.
get
(
"relation_codename"
);
Object
relationCodeName
=
field
.
get
(
"relation_codename"
);
Object
relationName
=
field
.
get
(
"relation_name"
);
field
.
setEntityId
(
curDEId
);
field
.
setEntityId
(
curDEId
);
field
.
setEntity
(
metaEntity
);
if
(
!
ObjectUtils
.
isEmpty
(
refDEName
)
&&
!
ObjectUtils
.
isEmpty
(
refFieldName
)){
if
(
!
ObjectUtils
.
isEmpty
(
refDEName
)
&&
!
ObjectUtils
.
isEmpty
(
refFieldName
)){
refDEId
=
DigestUtils
.
md5DigestAsHex
(
String
.
format
(
"%s||%s"
,
systemid
,
refDEName
).
getBytes
());
refDEId
=
DigestUtils
.
md5DigestAsHex
(
String
.
format
(
"%s||%s"
,
systemid
,
refDEName
).
getBytes
());
refFieldId
=
DigestUtils
.
md5DigestAsHex
(
String
.
format
(
"%s||%s"
,
refDEId
,
refFieldName
).
getBytes
());
refFieldId
=
DigestUtils
.
md5DigestAsHex
(
String
.
format
(
"%s||%s"
,
refDEId
,
refFieldName
).
getBytes
());
field
.
setRefFieldId
(
refFieldId
);
field
.
setRefFieldId
(
refFieldId
);
MetaField
reffield
=
new
MetaField
();
reffield
.
setFieldId
(
refFieldId
);
reffield
.
setFieldName
(
refFieldName
);
field
.
setReffield
(
reffield
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
curDEId
)
&&
!
ObjectUtils
.
isEmpty
(
refDEId
)
&&
!
ObjectUtils
.
isEmpty
(
relationCodeName
)){
if
(!
ObjectUtils
.
isEmpty
(
curDEId
)
&&
!
ObjectUtils
.
isEmpty
(
refDEId
)
&&
!
ObjectUtils
.
isEmpty
(
relationCodeName
)
&&
!
ObjectUtils
.
isEmpty
(
relationName
)
){
field
.
setRelationId
(
DigestUtils
.
md5DigestAsHex
(
String
.
format
(
"%s||%s||%s"
,
refDEId
,
curDEId
,
relationCodeName
).
getBytes
()));
field
.
setRelationId
(
DigestUtils
.
md5DigestAsHex
(
String
.
format
(
"%s||%s||%s"
,
refDEId
,
curDEId
,
relationCodeName
).
getBytes
()));
MetaRelationship
ship
=
new
MetaRelationship
();
ship
.
setName
(
relationName
.
toString
());
ship
.
setRefEntityName
(
refDEName
.
toString
());
ship
.
setCodeName
(
relationCodeName
.
toString
());
field
.
setRelation
(
ship
);
}
}
}
);
}
fields
.
addAll
(
deField
);
fields
.
addAll
(
deField
);
}
}
}
}
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/service/LiteCoreService.java
浏览文件 @
fc046a0a
...
@@ -47,7 +47,7 @@ public class LiteCoreService {
...
@@ -47,7 +47,7 @@ public class LiteCoreService {
@Transactional
@Transactional
public
boolean
syncSysModel
(
SysModel
sysModel
)
{
public
boolean
syncSysModel
(
SysModel
sysModel
)
{
//
proxyService.asyncSysModel(sysModel);
proxyService
.
asyncSysModel
(
sysModel
);
return
true
;
return
true
;
}
}
...
...
ibzlite-core/src/main/resources/liquibase/changelog/20200601200530_init_ibzcfg.xml
已删除
100644 → 0
浏览文件 @
ae23a367
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext=
"http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.9.xsd"
>
<changeSet
author=
"Think (generated)"
id=
"1591012776347-1"
>
<createTable
remarks=
"配置"
tableName=
"IBZCFG"
>
<column
name=
"CFGID"
remarks=
"配置标识"
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
/>
</column>
<column
name=
"SYSTEMID"
remarks=
"系统标识"
type=
"VARCHAR(100)"
/>
<column
name=
"CFGTYPE"
remarks=
"配置类型"
type=
"VARCHAR(100)"
/>
<column
name=
"TARGETTYPE"
remarks=
"引用对象"
type=
"VARCHAR(100)"
/>
<column
name=
"USERID"
remarks=
"用户标识"
type=
"VARCHAR(100)"
/>
<column
name=
"CFG"
remarks=
"配置"
type=
"MEDIUMTEXT"
/>
<column
name=
"UPDATEDATE"
remarks=
"更新时间"
type=
"datetime"
/>
</createTable>
</changeSet>
</databaseChangeLog>
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录