Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz4j Spring R7
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7后台标准模板
iBiz4j Spring R7
提交
91733830
提交
91733830
编写于
11月 12, 2020
作者:
zhouweidong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码规范检查
上级
699b696e
变更
4
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
83 行增加
和
83 行删除
+83
-83
%DE%.java.ftl
...ava/%SYS_PKGPATH%/core/%MOD_PKGPATH%/domain/%DE%.java.ftl
+42
-42
%DE%Mapper.java.ftl
...YS_PKGPATH%/core/%MOD_PKGPATH%/mapper/%DE%Mapper.java.ftl
+7
-7
I%DE%Service.java.ftl
...PKGPATH%/core/%MOD_PKGPATH%/service/I%DE%Service.java.ftl
+21
-21
PermissionSyncJob.java.ftl
...in/java/%SYS_PKGPATH%/util/job/PermissionSyncJob.java.ftl
+13
-13
未找到文件。
SLN/%PUBPRJ%-core/src/main/java/%SYS_PKGPATH%/core/%MOD_PKGPATH%/domain/%DE%.java.ftl
浏览文件 @
91733830
此差异已折叠。
点击以展开。
SLN/%PUBPRJ%-core/src/main/java/%SYS_PKGPATH%/core/%MOD_PKGPATH%/mapper/%DE%Mapper.java.ftl
浏览文件 @
91733830
...
...
@@ -30,33 +30,33 @@ public interface ${item.getCodeName()}Mapper extends BaseMapper<${item.getCodeNa
<#
if
item
.
getAllPSDEDataSets
()??>
<#
list
item
.
getAllPSDEDataSets
()
as
dedataset
>
Page
<<#
if
dedataset
.
isEnableGroup
()>
HashMap
<#
else
>${
item
.
getCodeName
()}</#
if
>>
search
${
dedataset
.
getCodeName
()}(
IPage
page
,
@
Param
(
"srf"
)
${
de
.
codeName
}
SearchContext
context
,
@
Param
(
"ew"
)
Wrapper
<${
item
.
getCodeName
()}>
wrapper
)
;
Page
<<#
if
dedataset
.
isEnableGroup
()>
HashMap
<#
else
>${
item
.
getCodeName
()}</#
if
>>
search
${
dedataset
.
getCodeName
()}(
IPage
page
,
@
Param
(
"srf"
)
${
de
.
codeName
}
SearchContext
context
,
@
Param
(
"ew"
)
Wrapper
<${
item
.
getCodeName
()}>
wrapper
);
</#
list
>
</#
if
>
<#
assign
keyfieldCodeName
=
item
.
getKeyPSDEField
().
codeName
?
lower_case
>
@
Override
<#
if
item
.
isEnableEntityCache
()==
true
>
@
Cacheable
(
value
=
"${item.codeName?lower_case}"
,
key
=
"'row:'+#p0"
)
@
Cacheable
(
value
=
"${item.codeName?lower_case}"
,
key
=
"'row:'+#p0"
)
</#
if
>
${
item
.
getCodeName
()}
selectById
(
Serializable
id
);
@
Override
<#
if
item
.
isEnableEntityCache
()==
true
>
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
key
=
"'row:'+#p0.${keyfieldCodeName}"
)
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
key
=
"'row:'+#p0.${keyfieldCodeName}"
)
</#
if
>
int
insert
(${
item
.
getCodeName
()}
entity
);
@
Override
<#
if
item
.
isEnableEntityCache
()==
true
>
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
key
=
"'row:'+#p0.${keyfieldCodeName}"
)
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
key
=
"'row:'+#p0.${keyfieldCodeName}"
)
</#
if
>
int
updateById
(@
Param
(
Constants
.
ENTITY
)
${
item
.
getCodeName
()}
entity
);
@
Override
<#
if
item
.
isEnableEntityCache
()==
true
>
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
key
=
"'row:'+#p0.${keyfieldCodeName}"
)
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
key
=
"'row:'+#p0.${keyfieldCodeName}"
)
</#
if
>
int
update
(@
Param
(
Constants
.
ENTITY
)
${
item
.
getCodeName
()}
entity
,
@
Param
(
"ew"
)
Wrapper
<${
item
.
codeName
}>
updateWrapper
);
@
Override
<#
if
item
.
isEnableEntityCache
()==
true
>
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
key
=
"'row:'+#p0"
)
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
key
=
"'row:'+#p0"
)
</#
if
>
int
deleteById
(
Serializable
id
);
/**
...
...
@@ -104,7 +104,7 @@ public interface ${item.getCodeName()}Mapper extends BaseMapper<${item.getCodeNa
<#
if
de
.
getDefaultPSDEDataSet
()??>
<#
assign
deDefaultDataSet
=
de
.
getDefaultPSDEDataSet
()>
<#
if
deDefaultDataSet
.
getPSDEDataQueries
()??>
List
<${
item
.
getCodeName
()}>
selectBy
${
srfcaseformat
(
MajorField
.
codeName
,
'l_u2lC'
)?
cap_first
}(@
Param
(
"${MajorkeyField.codeName?lower_case}"
)
Serializable
${
MajorkeyField
.
codeName
?
lower_case
})
;
List
<${
item
.
getCodeName
()}>
selectBy
${
srfcaseformat
(
MajorField
.
codeName
,
'l_u2lC'
)?
cap_first
}(@
Param
(
"${MajorkeyField.codeName?lower_case}"
)
Serializable
${
MajorkeyField
.
codeName
?
lower_case
});
</#
if
>
</#
if
>
...
...
SLN/%PUBPRJ%-core/src/main/java/%SYS_PKGPATH%/core/%MOD_PKGPATH%/service/I%DE%Service.java.ftl
浏览文件 @
91733830
...
...
@@ -63,8 +63,8 @@ public interface I${item.codeName}Service extends IService<${item.codeName}> {
boolean
execute
(
String
sql
,
Map
param
);
<#
if
hasDEPrefield
>
List
<${
de
.
codeName
}>
get
${
deCodeNameCamel
}
ByIds
(
List
<${
srfr7javatype
(
keyfield
.
stdDataType
)}>
ids
)
;
List
<${
de
.
codeName
}>
get
${
deCodeNameCamel
}
ByEntities
(
List
<${
de
.
codeName
}>
entities
)
;
List
<${
de
.
codeName
}>
get
${
deCodeNameCamel
}
ByIds
(
List
<${
srfr7javatype
(
keyfield
.
stdDataType
)}>
ids
);
List
<${
de
.
codeName
}>
get
${
deCodeNameCamel
}
ByEntities
(
List
<${
de
.
codeName
}>
entities
);
</#
if
>
}
<#
comment
>
NoSQL
存储
-
MongoDB
</#
comment
>
...
...
@@ -73,13 +73,13 @@ public interface I${item.codeName}Service extends IService<${item.codeName}> {
/**
*
实体
[${
item
.
codeName
}]
服务对象接口
*/
public
interface
I
${
item
.
codeName
}
Service
{
public
interface
I
${
item
.
codeName
}
Service
{
<@
addIDESerivceBody
/>
<#
if
hasDEPrefield
>
List
<${
de
.
codeName
}>
get
${
deCodeNameCamel
}
ByIds
(
List
<${
srfr7javatype
(
keyfield
.
stdDataType
)}>
ids
)
;
List
<${
de
.
codeName
}>
get
${
deCodeNameCamel
}
ByEntities
(
List
<${
de
.
codeName
}>
entities
)
;
List
<${
de
.
codeName
}>
get
${
deCodeNameCamel
}
ByIds
(
List
<${
srfr7javatype
(
keyfield
.
stdDataType
)}>
ids
);
List
<${
de
.
codeName
}>
get
${
deCodeNameCamel
}
ByEntities
(
List
<${
de
.
codeName
}>
entities
);
</#
if
>
}
...
...
@@ -88,7 +88,7 @@ public interface I${item.codeName}Service{
/**
*
实体
[${
item
.
codeName
}]
服务对象接口
*/
public
interface
I
${
item
.
codeName
}
Service
{
public
interface
I
${
item
.
codeName
}
Service
{
<@
addIDESerivceBody
/>
...
...
@@ -99,7 +99,7 @@ public interface I${item.codeName}Service{
/**
*
实体
[${
item
.
codeName
}]
服务对象接口
*/
public
interface
I
${
item
.
codeName
}
Service
{
public
interface
I
${
item
.
codeName
}
Service
{
<@
addIDESerivceBody
/>
...
...
@@ -122,25 +122,25 @@ public interface I${item.codeName}Service{
<#
elseif
deaction
.
codeName
?
lower_case
==
"create"
>
boolean
create
(${
item
.
codeName
}
et
)
;
<#
if
item
.
isEnableEntityCache
()==
true
>
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
allEntries
=
true
)
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
allEntries
=
true
)
</#
if
>
void
createBatch
(
List
<${
item
.
codeName
}>
list
)
;
<#
elseif
deaction
.
codeName
?
lower_case
==
"update"
>
boolean
update
(${
item
.
codeName
}
et
)
;
<#
if
item
.
isEnableEntityCache
()==
true
>
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
allEntries
=
true
)
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
allEntries
=
true
)
</#
if
>
void
updateBatch
(
List
<${
item
.
codeName
}>
list
)
;
<#
elseif
deaction
.
codeName
?
lower_case
==
"remove"
>
boolean
remove
(${
srfr7javatype
(
keyfield
.
stdDataType
)}
key
)
;
boolean
remove
(${
srfr7javatype
(
keyfield
.
stdDataType
)}
key
);
<#
if
item
.
isEnableEntityCache
()==
true
>
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
allEntries
=
true
)
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
allEntries
=
true
)
</#
if
>
void
removeBatch
(
Collection
<${
srfr7javatype
(
keyfield
.
stdDataType
)}>
idList
)
;
void
removeBatch
(
Collection
<${
srfr7javatype
(
keyfield
.
stdDataType
)}>
idList
);
<#
elseif
deaction
.
codeName
?
lower_case
==
"save"
>
boolean
save
(${
item
.
codeName
}
et
)
;
<#
if
item
.
isEnableEntityCache
()==
true
>
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
allEntries
=
true
)
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
allEntries
=
true
)
</#
if
>
void
saveBatch
(
List
<${
item
.
codeName
}>
list
)
;
<#
elseif
deaction
.
codeName
?
lower_case
==
"getdraft"
>
...
...
@@ -152,7 +152,7 @@ public interface I${item.codeName}Service{
<#
elseif
deaction
.
codeName
?
lower_case
==
"updatebatch"
>
<#
elseif
deaction
.
codeName
?
lower_case
==
"removebatch"
>
<#
else
>
${
item
.
codeName
}
${
srfmethodname
(
deaction
.
getCodeName
())}(${
item
.
codeName
}
et
)
;
${
item
.
codeName
}
${
srfmethodname
(
deaction
.
getCodeName
())}(${
item
.
codeName
}
et
);
</#
if
>
<@
outputTestActionDetail
deaction
/>
</#
if
>
...
...
@@ -160,7 +160,7 @@ public interface I${item.codeName}Service{
</#
if
>
<#
if
item
.
getAllPSDEDataSets
()??>
<#
list
item
.
getAllPSDEDataSets
()
as
dedataset
>
Page
<<#
if
dedataset
.
isEnableGroup
()>
HashMap
<#
else
>${
item
.
getCodeName
()}</#
if
>>
search
${
dedataset
.
getCodeName
()}(${
item
.
codeName
}
SearchContext
context
)
;
Page
<<#
if
dedataset
.
isEnableGroup
()>
HashMap
<#
else
>${
item
.
getCodeName
()}</#
if
>>
search
${
dedataset
.
getCodeName
()}(${
item
.
codeName
}
SearchContext
context
);
</#
list
>
</#
if
>
<#
comment
>
1
:
N
关系中,在子实体中创建父实体的实例对象
</#
comment
>
...
...
@@ -186,13 +186,13 @@ public interface I${item.codeName}Service{
void
resetBy
${
srfcaseformat
(
MajorField
.
codeName
,
'l_u2lC'
)?
cap_first
}(
Collection
<${
srfr7javatype
(
MajorField
.
stdDataType
)}>
ids
);
<#
elseif
MinorPSDER
.
getRemoveActionType
()?
c
==
'1'
><#
comment
>
同时删除
</#
comment
>
<#
if
item
.
isEnableEntityCache
()==
true
>
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
allEntries
=
true
)
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
allEntries
=
true
)
</#
if
>
void
removeBy
${
srfcaseformat
(
MajorField
.
codeName
,
'l_u2lC'
)?
cap_first
}(
Collection
<${
srfr7javatype
(
MajorField
.
stdDataType
)}>
ids
);
</#
if
>
</#
if
>
<#
if
item
.
isEnableEntityCache
()==
true
>
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
allEntries
=
true
)
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
allEntries
=
true
)
</#
if
>
void
removeBy
${
srfcaseformat
(
MajorField
.
codeName
,
'l_u2lC'
)?
cap_first
}(${
srfr7javatype
(
MajorField
.
stdDataType
)}
${
MajorkeyField
.
codeName
?
lower_case
});
<#
assign
nested
=
MinorPSDER
.
isNestedRS
()>
...
...
@@ -205,9 +205,9 @@ public interface I${item.codeName}Service{
</#
if
>
<#
if
nested
>
<#
if
item
.
isEnableEntityCache
()==
true
>
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
allEntries
=
true
)
@
CacheEvict
(
value
=
"${item.codeName?lower_case}"
,
allEntries
=
true
)
</#
if
>
void
saveBy
${
srfcaseformat
(
MajorField
.
codeName
,
'l_u2lC'
)?
cap_first
}(${
srfr7javatype
(
MajorField
.
stdDataType
)}
${
MajorkeyField
.
codeName
?
lower_case
},
List
<${
item
.
getCodeName
()}>
list
)
;
void
saveBy
${
srfcaseformat
(
MajorField
.
codeName
,
'l_u2lC'
)?
cap_first
}(${
srfr7javatype
(
MajorField
.
stdDataType
)}
${
MajorkeyField
.
codeName
?
lower_case
},
List
<${
item
.
getCodeName
()}>
list
)
;
</#
if
>
</#
if
>
</#
if
>
...
...
@@ -219,10 +219,10 @@ public interface I${item.codeName}Service{
</#
if
>
<#
comment
>
实体数据导入
</#
comment
>
<#
if
hasDEImport
>
JSONObject
importData
(
List
<${
de
.
codeName
}>
entities
,
int
batchSize
,
boolean
isIgnoreError
);
JSONObject
importData
(
List
<${
de
.
codeName
}>
entities
,
int
batchSize
,
boolean
isIgnoreError
);
@
Async
(
"asyncExecutor"
)
void
asyncImportData
(
List
<${
de
.
codeName
}>
entities
,
int
batchSize
,
boolean
isIgnoreError
);
void
asyncImportData
(
List
<${
de
.
codeName
}>
entities
,
int
batchSize
,
boolean
isIgnoreError
);
</#
if
>
</#
macro
>
...
...
SLN/%PUBPRJ%-util/src/main/java/%SYS_PKGPATH%/util/job/PermissionSyncJob.java.ftl
浏览文件 @
91733830
...
...
@@ -91,14 +91,14 @@ public class PermissionSyncJob implements ApplicationRunner {
public
void
run
(
ApplicationArguments
args
)
{
try
{
Thread
.
sleep
(
10000
);
InputStream
permission
=
this
.
getClass
().
getResourceAsStream
(
"/permission/systemResource.json"
);
//
获取当前系统所有实体资源能力
InputStream
permission
=
this
.
getClass
().
getResourceAsStream
(
"/permission/systemResource.json"
);
//
获取当前系统所有实体资源能力
String
permissionResult
=
IOUtils
.
toString
(
permission
,
"UTF-8"
);
JSONObject
system
=
new
JSONObject
();
system
.
put
(
"pssystemid"
,
systemId
);
system
.
put
(
"pssystemname"
,
systemName
);
system
.
put
(
"sysstructure"
,
JSONObject
.
parseObject
(
permissionResult
));
system
.
put
(
"md5check"
,
DigestUtils
.
md5DigestAsHex
(
permissionResult
.
getBytes
()));
if
(
client
.
syncSysAuthority
(
system
)){
if
(
client
.
syncSysAuthority
(
system
))
{
log
.
info
(
"向[UAA]同步系统资源成功"
);
}
else
{
log
.
error
(
"向[UAA]同步系统资源失败"
);
...
...
@@ -109,9 +109,9 @@ public class PermissionSyncJob implements ApplicationRunner {
}
try
{
InputStream
sysModel
=
this
.
getClass
().
getResourceAsStream
(
"/sysmodel/${sys.codeName}.json"
);
//
获取当前系统所有实体资源能力
InputStream
sysModel
=
this
.
getClass
().
getResourceAsStream
(
"/sysmodel/${sys.codeName}.json"
);
//
获取当前系统所有实体资源能力
String
strSysModel
=
IOUtils
.
toString
(
sysModel
,
"UTF-8"
);
if
(
liteFeignClient
.
syncSysModel
(
JSONObject
.
parseObject
(
strSysModel
))){
if
(
liteFeignClient
.
syncSysModel
(
JSONObject
.
parseObject
(
strSysModel
)))
{
log
.
info
(
"向[lite]同步系统模型成功"
);
}
else
{
log
.
error
(
"向[lite]同步系统模型失败"
);
...
...
@@ -123,7 +123,7 @@ public class PermissionSyncJob implements ApplicationRunner {
<#
if
hasWF
>
try
{
List
<
Map
<
String
,
Object
>>
bpmnfiles
=
new
ArrayList
();
List
<
Map
<
String
,
Object
>>
bpmnfiles
=
new
ArrayList
();
<#
list
sys
.
getAllPSWorkflows
()
as
wf
>
<#
if
wf
.
getPSWFVersions
()??>
<#
list
wf
.
getPSWFVersions
()
as
wfvs
>
...
...
@@ -131,23 +131,23 @@ public class PermissionSyncJob implements ApplicationRunner {
</#
list
>
</#
if
>
</#
list
>
if
(
client2
.
deployBpmnFile
(
bpmnfiles
)){
if
(
client2
.
deployBpmnFile
(
bpmnfiles
))
{
log
.
info
(
"部署流程成功"
);
}
else
{
log
.
error
(
"部署流程失败"
);
}
}
catch
(
Exception
ex
){
}
catch
(
Exception
ex
)
{
log
.
error
(
String
.
format
(
"部署流程失败,请检查[WF]服务是否正常! [%s]"
,
ex
));
}
</#
if
>
<#
if
hasMsgTemplate
>
try
{
InputStream
msgTemplate
=
this
.
getClass
().
getResourceAsStream
(
"/msgtempl/systemMsgTempl.json"
);
//
获取当前系统所有实体资源能力
InputStream
msgTemplate
=
this
.
getClass
().
getResourceAsStream
(
"/msgtempl/systemMsgTempl.json"
);
//
获取当前系统所有实体资源能力
String
strMsgTemplate
=
IOUtils
.
toString
(
msgTemplate
,
"UTF-8"
);
JSONObject
template
=
new
JSONObject
();
template
.
put
(
"template"
,
JSONArray
.
parseArray
(
strMsgTemplate
));
if
(
notifyFeignClient
.
createMsgTemplate
(
template
)){
JSONObject
template
=
new
JSONObject
();
template
.
put
(
"template"
,
JSONArray
.
parseArray
(
strMsgTemplate
));
if
(
notifyFeignClient
.
createMsgTemplate
(
template
))
{
log
.
info
(
"推送消息模板成功"
);
}
else
{
log
.
error
(
"推送消息模板失败"
);
...
...
@@ -159,9 +159,9 @@ public class PermissionSyncJob implements ApplicationRunner {
<#
if
hasPredefinedCodeList
>
try
{
InputStream
runtimeDict
=
this
.
getClass
().
getResourceAsStream
(
"/sysmodel/RuntimeDict.json"
);
//
获取当前系统所有实体资源能力
InputStream
runtimeDict
=
this
.
getClass
().
getResourceAsStream
(
"/sysmodel/RuntimeDict.json"
);
//
获取当前系统所有实体资源能力
String
strRuntimeDict
=
IOUtils
.
toString
(
runtimeDict
,
"UTF-8"
);
if
(
dictFeignClient
.
syncRuntimeDict
(
JSONArray
.
parseArray
(
strRuntimeDict
))){
if
(
dictFeignClient
.
syncRuntimeDict
(
JSONArray
.
parseArray
(
strRuntimeDict
)))
{
log
.
info
(
"推送系统预置代码表成功"
);
}
else
{
log
.
error
(
"推送系统预置代码表失败"
);
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录