Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzou
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzou
提交
fd116006
提交
fd116006
编写于
9月 17, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 部署微服务接口
上级
69923d5f
变更
22
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
22 个修改的文件
包含
2370 行增加
和
6 行删除
+2370
-6
config.xml
config.xml
+7
-0
application-web-prod.yml
...ibzou-app-web/src/main/resources/application-web-prod.yml
+1
-1
mysql.yml
ibzou-boot/src/main/docker/mysql.yml
+19
-0
SysDepartment.java
...rc/main/java/cn/ibizlab/core/ou/domain/SysDepartment.java
+12
-0
SysDeptMember.java
...rc/main/java/cn/ibizlab/core/ou/domain/SysDeptMember.java
+12
-0
SysEmployee.java
.../src/main/java/cn/ibizlab/core/ou/domain/SysEmployee.java
+12
-0
SysOrganization.java
.../main/java/cn/ibizlab/core/ou/domain/SysOrganization.java
+12
-0
SysPost.java
...core/src/main/java/cn/ibizlab/core/ou/domain/SysPost.java
+12
-0
SysTeam.java
...core/src/main/java/cn/ibizlab/core/ou/domain/SysTeam.java
+12
-0
SysTeamMember.java
...rc/main/java/cn/ibizlab/core/ou/domain/SysTeamMember.java
+12
-0
ibzou.json
ibzou-core/src/main/resources/sysmodel/ibzou.json
+2137
-0
Dockerfile
ibzou-provider/ibzou-provider-api/src/main/docker/Dockerfile
+1
-1
ibzou-provider-api.yaml
...bzou-provider-api/src/main/docker/ibzou-provider-api.yaml
+14
-1
application-api-prod.yml
...-provider-api/src/main/resources/application-api-prod.yml
+1
-1
IBZLiteFallback.java
...src/main/java/cn/ibizlab/util/client/IBZLiteFallback.java
+13
-0
IBZLiteFeignClient.java
.../main/java/cn/ibizlab/util/client/IBZLiteFeignClient.java
+17
-0
EntityBase.java
...util/src/main/java/cn/ibizlab/util/domain/EntityBase.java
+30
-0
EntityClient.java
...il/src/main/java/cn/ibizlab/util/domain/EntityClient.java
+11
-0
EntityMP.java
...u-util/src/main/java/cn/ibizlab/util/domain/EntityMP.java
+10
-0
PermissionSyncJob.java
.../src/main/java/cn/ibizlab/util/job/PermissionSyncJob.java
+23
-0
application-nacos.yml
ibzou-util/src/main/resources/application-nacos.yml
+1
-1
application-sys.yml
ibzou-util/src/main/resources/application-sys.yml
+1
-1
未找到文件。
config.xml
浏览文件 @
fd116006
...
...
@@ -37,6 +37,13 @@
git clone -b master $para2 ibzou/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzou/
mvn clean package -Papi
echo
'
echo
"
$para1
"'
>
apppasswd.sh
chmod -R 777 *
setsid env SSH_ASKPASS=
'
./apppasswd.sh
'
DISPLAY=
'
none:0
'
ssh 172.16.180.237@172.16.180.237
"
mkdir -p /6FA57A4B-AA77-4DA7-A2C6-E283F7285664
"
setsid env SSH_ASKPASS=
'
./apppasswd.sh
'
DISPLAY=
'
none:0
'
scp -r ibzou-provider-api.jar 172.16.180.237@172.16.180.237:/6FA57A4B-AA77-4DA7-A2C6-E283F7285664
setsid env SSH_ASKPASS=
'
./apppasswd.sh
'
DISPLAY=
'
none:0
'
ssh 172.16.180.237@172.16.180.237
"
ps -ef | grep
'
/6FA57A4B-AA77-4DA7-A2C6-E283F7285664
'
| tr -s
'
'
|cut -d
'
'
-f2,8,9 | grep -v grep | grep
'
jar
'
| cut -d
'
'
-f1|xargs --no-run-if-empty kill -9
"
setsid env SSH_ASKPASS=
'
./apppasswd.sh
'
DISPLAY=
'
none:0
'
ssh 172.16.180.237@172.16.180.237
"
source /etc/profile;source ~/.bash_profile; nohup java -jar -Xms512m -Xmx1024m -XX:PermSize=128M -XX:MaxPermSize=128m /6FA57A4B-AA77-4DA7-A2C6-E283F7285664/ibzou-provider-api.jar
>>
/6FA57A4B-AA77-4DA7-A2C6-E283F7285664/ibzou_apiibzou-`date --date=
'
0 days ago
'
+%Y-%m-%d`.log 2
>&
1
&"
</command>
</hudson.tasks.Shell>
</builders>
...
...
ibzou-app/ibzou-app-web/src/main/resources/application-web-prod.yml
浏览文件 @
fd116006
server
:
port
:
8080
port
:
30001
#Log配置
logging
:
level
:
...
...
ibzou-boot/src/main/docker/mysql.yml
0 → 100644
浏览文件 @
fd116006
version
:
"
3.2"
services
:
ibzou-mysql
:
image
:
mysql:5.7.20
volumes
:
-
$PWD/../../../../volumes/mysql/:/var/lib/mysql/
networks
:
-
agent_network
environment
:
-
TZ=Asia/Shanghai
-
MYSQL_ALLOW_EMPTY_PASSWORD=yes
-
MYSQL_ROOT_PASSWORD=root
-
MYSQL_DATABASE=a_A_5d9d78509
ports
:
-
3306:3306
command
:
mysqld --lower_case_table_names=1 --skip-ssl --character_set_server=utf8 --explicit_defaults_for_timestamp
networks
:
agent_network
:
attachable
:
true
ibzou-core/src/main/java/cn/ibizlab/core/ou/domain/SysDepartment.java
浏览文件 @
fd116006
...
...
@@ -269,6 +269,18 @@ public class SysDepartment extends EntityMP implements Serializable {
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
@Override
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
this
.
reset
(
"deptid"
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
}
}
ibzou-core/src/main/java/cn/ibizlab/core/ou/domain/SysDeptMember.java
浏览文件 @
fd116006
...
...
@@ -165,6 +165,18 @@ public class SysDeptMember extends EntityMP implements Serializable {
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
@Override
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
this
.
reset
(
"memberid"
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
}
}
ibzou-core/src/main/java/cn/ibizlab/core/ou/domain/SysEmployee.java
浏览文件 @
fd116006
...
...
@@ -581,6 +581,18 @@ public class SysEmployee extends EntityMP implements Serializable {
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
@Override
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
this
.
reset
(
"userid"
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
}
}
ibzou-core/src/main/java/cn/ibizlab/core/ou/domain/SysOrganization.java
浏览文件 @
fd116006
...
...
@@ -202,6 +202,18 @@ public class SysOrganization extends EntityMP implements Serializable {
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
@Override
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
this
.
reset
(
"orgid"
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
}
}
ibzou-core/src/main/java/cn/ibizlab/core/ou/domain/SysPost.java
浏览文件 @
fd116006
...
...
@@ -113,6 +113,18 @@ public class SysPost extends EntityMP implements Serializable {
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
@Override
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
this
.
reset
(
"postid"
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
}
}
ibzou-core/src/main/java/cn/ibizlab/core/ou/domain/SysTeam.java
浏览文件 @
fd116006
...
...
@@ -98,6 +98,18 @@ public class SysTeam extends EntityMP implements Serializable {
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
@Override
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
this
.
reset
(
"teamid"
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
}
}
ibzou-core/src/main/java/cn/ibizlab/core/ou/domain/SysTeamMember.java
浏览文件 @
fd116006
...
...
@@ -174,6 +174,18 @@ public class SysTeamMember extends EntityMP implements Serializable {
return
DigestUtils
.
md5DigestAsHex
(
String
.
format
(
"%s||%s"
,
this
.
getTeamid
(),
this
.
getUserid
()).
getBytes
());
return
null
;
}
/**
* 复制当前对象数据到目标对象(粘贴重置)
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
@Override
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
this
.
reset
(
"teammemberid"
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
}
}
ibzou-core/src/main/resources/sysmodel/ibzou.json
0 → 100644
浏览文件 @
fd116006
此差异已折叠。
点击以展开。
ibzou-provider/ibzou-provider-api/src/main/docker/Dockerfile
浏览文件 @
fd116006
...
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-provider-api.jar
EXPOSE
808
1
EXPOSE
4000
1
ADD
ibzou-provider-api.jar /ibzou-provider-api.jar
ibzou-provider/ibzou-provider-api/src/main/docker/ibzou-provider-api.yaml
浏览文件 @
fd116006
...
...
@@ -3,9 +3,22 @@ services:
ibzou-provider-api
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-provider-api:latest
ports
:
-
"
8081:808
1"
-
"
40001:4000
1"
networks
:
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
-
SERVER_PORT=40001
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211:8848
-
SPRING_REDIS_HOST=172.16.100.243
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
-
SPRING_DATASOURCE_PASSWORD=@6dEfb3@
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
-
NACOS=172.16.102.211:8848
deploy
:
resources
:
limits
:
...
...
ibzou-provider/ibzou-provider-api/src/main/resources/application-api-prod.yml
浏览文件 @
fd116006
server
:
port
:
808
1
port
:
4000
1
#Log配置
logging
:
level
:
...
...
ibzou-util/src/main/java/cn/ibizlab/util/client/IBZLiteFallback.java
0 → 100644
浏览文件 @
fd116006
package
cn
.
ibizlab
.
util
.
client
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.stereotype.Component
;
@Component
public
class
IBZLiteFallback
implements
IBZLiteFeignClient
{
@Override
public
Boolean
syncSysModel
(
JSONObject
system
)
{
return
null
;
}
}
ibzou-util/src/main/java/cn/ibizlab/util/client/IBZLiteFeignClient.java
0 → 100644
浏览文件 @
fd116006
package
cn
.
ibizlab
.
util
.
client
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
@FeignClient
(
value
=
"${ibiz.ref.service.lite:ibzlite-api}"
,
contextId
=
"lite"
,
fallback
=
IBZLiteFallback
.
class
)
public
interface
IBZLiteFeignClient
{
/**
* 同步系统资模型到lite
* @param system 系统模型信息
* @return
*/
@PostMapping
(
"/dstsystems/save"
)
Boolean
syncSysModel
(
@RequestBody
JSONObject
system
);
}
ibzou-util/src/main/java/cn/ibizlab/util/domain/EntityBase.java
浏览文件 @
fd116006
...
...
@@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import
org.springframework.cglib.beans.BeanMap
;
import
org.springframework.data.annotation.Transient
;
import
org.springframework.util.AlternativeJdkIdGenerator
;
import
org.springframework.util.ObjectUtils
;
import
java.io.Serializable
;
import
java.lang.reflect.Field
;
import
org.springframework.util.StringUtils
;
import
java.util.*
;
...
...
@@ -96,4 +98,32 @@ public class EntityBase implements Serializable {
this
.
extensionparams
.
put
(
field
.
toLowerCase
(),
value
);
}
/**
* 复制当前对象数据到目标对象
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
){
if
(
targetEntity
instanceof
EntityBase
){
EntityBase
target
=
(
EntityBase
)
targetEntity
;
Hashtable
<
String
,
Field
>
sourceFields
=
DEFieldCacheMap
.
getFieldMap
(
this
.
getClass
());
for
(
String
field
:
sourceFields
.
keySet
()){
Object
value
=
this
.
get
(
field
);
if
(
!
ObjectUtils
.
isEmpty
(
value
)
||
ObjectUtils
.
isEmpty
(
value
)
&&
getFocusNull
().
contains
(
field
)
&&
bIncEmpty
){
target
.
set
(
field
,
value
);
}
}
}
return
targetEntity
;
}
/**
* 重置当前数据对象属性值
* @param field
*/
public
void
reset
(
String
field
){
}
}
\ No newline at end of file
ibzou-util/src/main/java/cn/ibizlab/util/domain/EntityClient.java
浏览文件 @
fd116006
package
cn
.
ibizlab
.
util
.
domain
;
import
org.springframework.util.StringUtils
;
public
class
EntityClient
extends
EntityBase
{
@Override
...
...
@@ -15,5 +17,14 @@ public class EntityClient extends EntityBase {
}
}
@Override
public
void
reset
(
String
field
)
{
if
(!
StringUtils
.
isEmpty
(
field
)){
String
resetField
=
field
.
toLowerCase
();
this
.
set
(
resetField
,
null
);
this
.
getFocusNull
().
remove
(
resetField
);
getExtensionparams
().
remove
(
resetField
+
"dirtyflag"
);
}
}
}
ibzou-util/src/main/java/cn/ibizlab/util/domain/EntityMP.java
浏览文件 @
fd116006
package
cn
.
ibizlab
.
util
.
domain
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
org.springframework.util.StringUtils
;
public
class
EntityMP
extends
EntityBase
{
...
...
@@ -24,5 +25,14 @@ public class EntityMP extends EntityBase {
this
.
getFocusNull
().
remove
(
field
.
toLowerCase
());
}
@Override
public
void
reset
(
String
field
){
if
(!
StringUtils
.
isEmpty
(
field
)){
String
resetField
=
field
.
toLowerCase
();
this
.
set
(
resetField
,
null
);
getFocusNull
().
remove
(
resetField
);
}
}
}
ibzou-util/src/main/java/cn/ibizlab/util/job/PermissionSyncJob.java
浏览文件 @
fd116006
package
cn
.
ibizlab
.
util
.
job
;
import
cn.ibizlab.util.client.IBZUAAFeignClient
;
import
cn.ibizlab.util.client.IBZLiteFeignClient
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONArray
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -36,6 +37,10 @@ public class PermissionSyncJob implements ApplicationRunner {
@Autowired
@Lazy
IBZLiteFeignClient
liteFeignClient
;
@Override
public
void
run
(
ApplicationArguments
args
)
{
try
{
...
...
@@ -57,6 +62,24 @@ public class PermissionSyncJob implements ApplicationRunner {
log
.
error
(
String
.
format
(
"向[UAA]同步系统资源失败,请检查[UAA]服务是否正常! [%s]"
,
ex
));
}
try
{
InputStream
sysModel
=
this
.
getClass
().
getResourceAsStream
(
"/sysmodel/ibzou.json"
);
//获取当前系统所有实体资源能力
String
strSysModel
=
IOUtils
.
toString
(
sysModel
,
"UTF-8"
);
JSONObject
system
=
new
JSONObject
();
system
.
put
(
"pssystemid"
,
systemId
);
system
.
put
(
"pssystemname"
,
systemName
);
system
.
put
(
"sysstructure"
,
JSONObject
.
parseObject
(
strSysModel
));
system
.
put
(
"md5check"
,
DigestUtils
.
md5DigestAsHex
(
strSysModel
.
getBytes
()));
if
(
liteFeignClient
.
syncSysModel
(
system
)){
log
.
info
(
"向[lite]同步系统模型成功"
);
}
else
{
log
.
error
(
"向[lite]同步系统模型失败"
);
}
}
catch
(
Exception
ex
)
{
log
.
error
(
String
.
format
(
"向[lite]同步系统模型失败,请检查[lite]服务是否正常! [%s]"
,
ex
));
}
}
}
\ No newline at end of file
ibzou-util/src/main/resources/application-nacos.yml
浏览文件 @
fd116006
...
...
@@ -3,7 +3,7 @@ spring:
cloud
:
nacos
:
discovery
:
server-addr
:
1
27.0.0.
1:8848
server-addr
:
1
72.16.102.21
1:8848
enabled
:
true
eureka
:
...
...
ibzou-util/src/main/resources/application-sys.yml
浏览文件 @
fd116006
...
...
@@ -7,7 +7,7 @@ spring:
caffeine
:
spec
:
initialCapacity=5,maximumSize=500,expireAfterWrite=3600s
redis
:
host
:
1
27.0.0.1
host
:
1
72.16.100.243
port
:
6379
password
:
database
:
0
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录