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