Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz4j Spring R7
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7后台标准模板
iBiz4j Spring R7
提交
0502e58a
提交
0502e58a
编写于
7月 02, 2020
作者:
zhouweidong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
从接口测试行为
上级
6adc0f77
变更
2
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
137 行增加
和
3 行删除
+137
-3
I%DE%Service.java.ftl
...PKGPATH%/core/%MOD_PKGPATH%/service/I%DE%Service.java.ftl
+1
-1
%ITEM%Resource.java.ftl
...YS_PKGPATH%/%SYSAPI_PKGPATH%/rest/%ITEM%Resource.java.ftl
+136
-2
未找到文件。
SLN/%PUBPRJ%-core/src/main/java/%SYS_PKGPATH%/core/%MOD_PKGPATH%/service/I%DE%Service.java.ftl
浏览文件 @
0502e58a
...
...
@@ -198,7 +198,7 @@ public interface I${item.codeName}Service{
<#
comment
>
输出测试行为
</#
comment
>
<#
macro
outputTestActionDetail
deaction
>
<#
if
deaction
.
getTestActionMode
??
&&
deaction
.
getTestActionMode
()??
&&
(
deaction
.
getTestActionMode
()
==
3
)
>
<#
if
deaction
.
getTestActionMode
??
&&
deaction
.
getTestActionMode
()??
&&
(
deaction
.
getTestActionMode
()
==
1
||
deaction
.
getTestActionMode
()
==
3
)
>
<#
if
(
deaction
.
getActionType
()==
'USERCUSTOM'
)>
boolean
test
${
srfmethodname
(
deaction
.
getCodeName
())?
cap_first
}(${
item
.
getCodeName
()}
et
);
<#
elseif
deaction
.
getActionType
()==
'DELOGIC'
>
...
...
SLN/%PUBPRJ%-provider/%PUBPRJ%-provider-%SYSAPI_PKGPATH%/src/main/java/%SYS_PKGPATH%/%SYSAPI_PKGPATH%/rest/%ITEM%Resource.java.ftl
浏览文件 @
0502e58a
...
...
@@ -141,7 +141,7 @@ public class ${itemCodeName}Resource {
<#
assign
deaction
=
apiMethod
.
getPSDEAction
()>
<#
assign
deactionName
=
deaction
.
getName
()>
<#
assign
deactionCodeName
=
deaction
.
getCodeName
()>
<#
comment
>
输出测试行为
</#
comment
>
<#
comment
>
输出
主接口
测试行为
</#
comment
>
<@
outputTestActionDetail
deaction
/>
<#
if
deaction
.
codeName
?
lower_case
==
'create'
>
<@
SecurityAnnotation
deaction
/>
...
...
@@ -391,6 +391,8 @@ public class ${itemCodeName}Resource {
<#
assign
deaction
=
apiMethod
.
getPSDEAction
()>
<#
assign
deactionName
=
deaction
.
getName
()>
<#
assign
deactionCodeName
=
deaction
.
getCodeName
()>
<#
comment
>
输出从接口测试行为
</#
comment
>
<@
outputTestActionDetail2
deaction
/>
<#
if
deaction
.
codeName
?
lower_case
==
'create'
>
<@
SecurityAnnotation
deaction
/>
@
ApiOperation
(
value
=
"${byTagParams}建立${deLogicName}"
,
tags
=
{
"${deLogicName}"
},
notes
=
"${byTagParams}建立${deLogicName}"
)
...
...
@@ -682,7 +684,7 @@ public class ${itemCodeName}Resource {
</#
if
>
</#
macro
>
<#
comment
>
输出测试行为
</#
comment
>
<#
comment
>
输出
主接口
测试行为
</#
comment
>
<#
macro
outputTestActionDetail
deaction
>
<#
if
deaction
.
getTestActionMode
??
&&
deaction
.
getTestActionMode
()??
&&
(
deaction
.
getTestActionMode
()
==
3
)
>
<#
assign
deactionName
=
deaction
.
getName
()>
...
...
@@ -794,5 +796,137 @@ public class ${itemCodeName}Resource {
</#
macro
>
<#
comment
>
输出关系接口测试行为
</#
comment
>
<#
macro
outputTestActionDetail2
deaction
>
<#
if
deaction
.
getTestActionMode
??
&&
deaction
.
getTestActionMode
()??
&&
(
deaction
.
getTestActionMode
()
==
3
)
>
<#
assign
deactionName
=
deaction
.
getName
()>
<#
assign
deactionCodeName
=
deaction
.
getCodeName
()>
<#
if
deaction
.
codeName
?
lower_case
==
'create'
>
<@
SecurityAnnotation
deaction
/>
@
ApiOperation
(
value
=
"${byTagParams}建立${deLogicName}"
,
tags
=
{
"${deLogicName}"
},
notes
=
"${byTagParams}建立${deLogicName}"
)
@
RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"${fullPath}/test"
)
<#
if
de
.
getStorageMode
()==
4
><#
else
>
@
Transactional
</#
if
>
public
ResponseEntity
<
Boolean
>
testCreate
${
byParams
}(${
etParams
})
{
${
deCodeName
}
domain
=
${
itemCodeNameLC
}
Mapping
.
toDomain
(${
itemCodeNameLC
}
dto
);
${
parentSetParams
}
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(${
deCodeNameLC
}
Service
.
testCreate
(
domain
));
}
<@
SecurityBatchAnnotation
deaction
/>
@
ApiOperation
(
value
=
"${byTagParams}批量建立${deLogicName}"
,
tags
=
{
"${deLogicName}"
},
notes
=
"${byTagParams}批量建立${deLogicName}"
)
@
RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"${fullPath}/batch/test"
)
public
ResponseEntity
<
Boolean
>
testCreateBatch
${
byParams
}(${
etParamsList
})
{
List
<${
deCodeName
}>
domainlist
=${
itemCodeNameLC
}
Mapping
.
toDomain
(${
itemCodeNameLC
}
dtos
);
for
(${
deCodeName
}
domain
:
domainlist
){
${
parentSetParams
}
}
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(${
deCodeNameLC
}
Service
.
testCreateBatch
(
domainlist
));
}
<#
elseif
deaction
.
codeName
?
lower_case
==
'update'
>
<@
SecurityAnnotation
deaction
/>
@
ApiOperation
(
value
=
"${byTagParams}更新${deLogicName}"
,
tags
=
{
"${deLogicName}"
},
notes
=
"${byTagParams}更新${deLogicName}"
)
@
RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"${fullPath}/{${itemCodeNameLC + keyCNLC}}/test"
)
<#
if
de
.
getStorageMode
()==
4
><#
else
>
@
Transactional
</#
if
>
public
ResponseEntity
<
Boolean
>
testUpdate
${
byParams
}(${
id_etParams
})
{
${
deCodeName
}
domain
=
${
itemCodeNameLC
}
Mapping
.
toDomain
(${
itemCodeNameLC
}
dto
);
${
parentSetParams
}
domain
.
set
${
dePKCodeName
}(${
itemCodeNameLC
+
keyCNLC
});
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(${
deCodeNameLC
}
Service
.
testUpdate
(
domain
));
}
<@
SecurityBatchAnnotation
deaction
/>
@
ApiOperation
(
value
=
"${byTagParams}批量更新${deLogicName}"
,
tags
=
{
"${deLogicName}"
},
notes
=
"${byTagParams}批量更新${deLogicName}"
)
@
RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"${fullPath}/batch/test"
)
public
ResponseEntity
<
Boolean
>
testUpdateBatch
${
byParams
}(${
etParamsList
})
{
List
<${
deCodeName
}>
domainlist
=${
itemCodeNameLC
}
Mapping
.
toDomain
(${
itemCodeNameLC
}
dtos
);
for
(${
deCodeName
}
domain
:
domainlist
){
${
parentSetParams
}
}
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(${
deCodeNameLC
}
Service
.
testUpdateBatch
(
domainlist
));
}
<#
elseif
deaction
.
codeName
?
lower_case
==
'remove'
>
<@
SecurityAnnotation
deaction
/>
@
ApiOperation
(
value
=
"${byTagParams}删除${deLogicName}"
,
tags
=
{
"${deLogicName}"
},
notes
=
"${byTagParams}删除${deLogicName}"
)
@
RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"${fullPath}/{${itemCodeNameLC + keyCNLC}}/test"
)
<#
if
de
.
getStorageMode
()==
4
><#
else
>
@
Transactional
</#
if
>
public
ResponseEntity
<
Boolean
>
testRemove
${
byParams
}(${
idParams
})
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(${
deCodeNameLC
}
Service
.
testRemove
(${
itemCodeNameLC
+
keyCNLC
}));
}
<@
SecurityBatchAnnotation
deaction
/>
@
ApiOperation
(
value
=
"${byTagParams}批量删除${deLogicName}"
,
tags
=
{
"${deLogicName}"
},
notes
=
"${byTagParams}批量删除${deLogicName}"
)
@
RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"${fullPath}/batch/test"
)
public
ResponseEntity
<
Boolean
>
testRemoveBatch
${
byParams
}(@
RequestBody
List
<${
srfjavatype
(
de
.
getKeyPSDEField
().
getStdDataType
())}>
ids
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(${
deCodeNameLC
}
Service
.
testRemoveBatch
(
ids
));
}
<#
elseif
deaction
.
codeName
?
lower_case
==
'save'
>
<@
SecurityAnnotation
deaction
/>
@
ApiOperation
(
value
=
"${byTagParams}保存${deLogicName}"
,
tags
=
{
"${deLogicName}"
},
notes
=
"${byTagParams}保存${deLogicName}"
)
@
RequestMapping
(
method
=
RequestMethod
.${
reqMtd
},
value
=
"${fullPath}/${deactionCodeName?lower_case}/test"
)
public
ResponseEntity
<
Boolean
>
testSave
${
byParams
}(${
etParams
})
{
${
deCodeName
}
domain
=
${
itemCodeNameLC
}
Mapping
.
toDomain
(${
itemCodeNameLC
}
dto
);
${
parentSetParams
}
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(${
deCodeNameLC
}
Service
.
testSave
(
domain
));
}
<@
SecurityBatchAnnotation
deaction
/>
@
ApiOperation
(
value
=
"${byTagParams}批量保存${deLogicName}"
,
tags
=
{
"${deLogicName}"
},
notes
=
"${byTagParams}批量保存${deLogicName}"
)
@
RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"${fullPath}/savebatch/test"
)
public
ResponseEntity
<
Boolean
>
testSaveBatch
${
byParams
}(${
etParamsList
})
{
List
<${
deCodeName
}>
domainlist
=${
itemCodeNameLC
}
Mapping
.
toDomain
(${
itemCodeNameLC
}
dtos
);
for
(${
deCodeName
}
domain
:
domainlist
){
${
parentSetParams
}
}
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(${
deCodeNameLC
}
Service
.
testSaveBatch
(
domainlist
));
}
<#
elseif
deaction
.
codeName
?
lower_case
==
'get'
>
<@
SecurityAnnotation
deaction
/>
@
ApiOperation
(
value
=
"${byTagParams}获取${deLogicName}"
,
tags
=
{
"${deLogicName}"
},
notes
=
"${byTagParams}获取${deLogicName}"
)
@
RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"${fullPath}/{${itemCodeNameLC + keyCNLC}}/test"
)
public
ResponseEntity
<
Boolean
>
testGet
${
byParams
}(${
idParams
})
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(${
deCodeNameLC
}
Service
.
testGet
(${
itemCodeNameLC
+
keyCNLC
}));
}
<#
elseif
deaction
.
codeName
?
lower_case
==
'checkkey'
>
@
ApiOperation
(
value
=
"${byTagParams}检查${deLogicName}"
,
tags
=
{
"${deLogicName}"
},
notes
=
"${byTagParams}检查${deLogicName}"
)
@
RequestMapping
(
method
=
RequestMethod
.${
reqMtd
},
value
=
"${fullPath}/${deactionCodeName?lower_case}/test"
)
public
ResponseEntity
<
Boolean
>
testCheckKey
${
byParams
}(${
etParams
})
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(${
deCodeNameLC
}
Service
.
testCheckKey
(${
itemCodeNameLC
}
Mapping
.
toDomain
(${
itemCodeNameLC
}
dto
)));
}
<#
elseif
deaction
.
codeName
?
lower_case
==
'getdraft'
>
@
ApiOperation
(
value
=
"${byTagParams}获取${deLogicName}草稿"
,
tags
=
{
"${deLogicName}"
},
notes
=
"${byTagParams}获取${deLogicName}草稿"
)
@
RequestMapping
(
method
=
RequestMethod
.${
reqMtd
},
value
=
"${fullPath}/${deactionCodeName?lower_case}/test"
)
public
ResponseEntity
<
Boolean
>
testGetDraft
${
byParams
}(${
parentParams
})
{
${
deCodeName
}
domain
=
new
${
deCodeName
}();
${
parentSetParams
}
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(${
itemCodeNameLC
}
Mapping
.
toDto
(${
deCodeNameLC
}
Service
.
testGetDraft
(
domain
)));
}
<#
elseif
deaction
.
codeName
?
lower_case
==
'createbatch'
>
<#
elseif
deaction
.
codeName
?
lower_case
==
'updatebatch'
>
<#
elseif
deaction
.
codeName
?
lower_case
==
'removebatch'
>
<#
elseif
deaction
.
codeName
?
lower_case
==
'savebatch'
>
<#
elseif
deaction
.
getUserTag
()??
&&
deaction
.
getActionType
()??
&&
deaction
.
getUserTag
()
==
'REGIST'
&&
deaction
.
getActionType
()
==
'USERCREATE'
>
<#
else
>
<@
SecurityAnnotation
deaction
/>
@
ApiOperation
(
value
=
"${byTagParams}${deLogicName}"
,
tags
=
{
"${deLogicName}"
},
notes
=
"${byTagParams}${deLogicName}"
)
@
RequestMapping
(
method
=
RequestMethod
.${
reqMtd
},
value
=
"${fullPath}/{${itemCodeNameLC + keyCNLC}}/${deactionCodeName?lower_case}/test"
)
<#
if
de
.
getStorageMode
()==
4
><#
else
>
@
Transactional
</#
if
>
public
ResponseEntity
<
Boolean
>
test
${
deactionCodeName
?
cap_first
}${
byParams
}(${
id_etParams
})
{
${
deCodeName
}
domain
=
${
itemCodeNameLC
}
Mapping
.
toDomain
(${
itemCodeNameLC
}
dto
);
${
parentSetParams
}
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(${
deCodeNameLC
}
Service
.
test
${
srfmethodname
(
deactionCodeName
)?
cap_first
}(
domain
));
}
</#
if
>
</#
if
>
</#
macro
>
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录