Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
10d71a9c
提交
10d71a9c
编写于
9月 01, 2022
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bugfix
上级
39c53762
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
12 行增加
和
5 行删除
+12
-5
G1ResResource.java.hbs
.../{{packageName}}/api/{{apps}}/rest/G1ResResource.java.hbs
+7
-0
{{pascalCase appEntities}}Resource.java.hbs
...{{apps}}/rest/{{pascalCase appEntities}}Resource.java.hbs
+2
-2
{{entities@SQL}}ServiceBase.java.hbs
...dules}}/service/impl/{{entities@SQL}}ServiceBase.java.hbs
+2
-2
{{entities@SQL}}ServiceImpl.java.hbs
...dules}}/service/impl/{{entities@SQL}}ServiceImpl.java.hbs
+1
-1
未找到文件。
modules/ibizlab-template/ibizlab-template-apivo/src/main/resources/templ/{{projectName}}-rest/src/main/java/{{packageName}}/api/{{apps}}/rest/G1ResResource.java.hbs
浏览文件 @
10d71a9c
...
...
@@ -36,8 +36,15 @@ public class G1ResResource {
{{#
each
app
.
exModel
as
|
item
|
}}
INSERT INTO datasubscription (C_ID, C_ACCESS_ID, C_RESOURCE_ID, C_CRON, C_TARGET) VALUES ('hbxfdpt0068-
{{
upperCase
@key
}}
', 'hbxfdpt0068', 'TOPIC_WSXF_RESOURCE_
{{
upperCase
@key
}}
', '20 3 * * *', null);
{{/
each
}}
{{#
each
app
.
appEntities
as
|
appEntity
|
}}
{{#
each
appEntity
.
forms
as
|
form
|
}}
INSERT INTO apioperation (C_ID, C_RESOURCE_ID, C_VALUE, C_TAGS, C_HTTP_METHOD, C_PATH, C_DOC_PATH) VALUES ('add
{{
pascalCase
appEntity
.
codeName
}}{{
pascalCase
form
.
codeName
}}
UsingPOST', 'push', '新建
{{
appEntity
.
entity
.
logicName
}}
[
{{
form
.
codeName
}}
]
{{
replace
form
.
logicName
"表单"
""
}}
', '
{{
appEntity
.
entity
.
logicName
}}
', 'POST', '/xftong/link/
{{
pluralize
appEntity
.
entity
.
codeName
}}
/
{{
lowerCase
form
.
codeName
}}
', '/xftong/doc2.html#/服务接口/
{{
appEntity
.
entity
.
logicName
}}
/add
{{
pascalCase
appEntity
.
codeName
}}{{
pascalCase
form
.
codeName
}}
UsingPOST');
{{/
each
}}
{{/
each
}}
*/
{{#
each
app
.
exModel
as
|
item
|
}}
@ApiOperationSupport(order = 1
{{
@index
}}
)
@ApiOperation(value = "
{{
item
}}
", tags = {"资源目录" }, notes = "topic主题:TOPIC_WSXF_RESOURCE_
{{
upperCase
@key
}}
")
...
...
modules/ibizlab-template/ibizlab-template-apivo/src/main/resources/templ/{{projectName}}-rest/src/main/java/{{packageName}}/api/{{apps}}/rest/{{pascalCase appEntities}}Resource.java.hbs
浏览文件 @
10d71a9c
...
...
@@ -43,13 +43,13 @@ public class {{pascalCase appEntity.codeName}}Resource {
{{#
each
appEntity
.
forms
}}
@ApiOperation(value = "新建[
{{
codeName
}}
]
{{
replace
logicName
"表单"
""
}}
", tags = {"
{{
appEntity
.
entity
.
logicName
}}
" }, notes = "新建[
{{
codeName
}}
]
{{
replace
logicName
"表单"
""
}}
")
@RequestMapping(method = RequestMethod.POST, value = "/
{{
lowerCase
codeName
}}
")
public ResponseEntity
<
{{
pascalCase
codeName
}}
Dto>
add
{{
pascalCase
codeName
}}
(@Validated @RequestBody
{{
pascalCase
codeName
}}
AddDto dto) {
public ResponseEntity
<
{{
pascalCase
codeName
}}
Dto>
add
{{
pascalCase
appEntity
.
codeName
}}{{
pascalCase
codeName
}}
(@Validated @RequestBody
{{
pascalCase
codeName
}}
AddDto dto) {
return null;
}
@ApiOperation(value = "更新[
{{
codeName
}}
]
{{
replace
logicName
"表单"
""
}}
", tags = {"
{{
appEntity
.
entity
.
logicName
}}
" }, notes = "更新[
{{
codeName
}}
]
{{
replace
logicName
"表单"
""
}}
")
@RequestMapping(method = RequestMethod.PUT, value = "/
{{
lowerCase
codeName
}}
/{id}")
public ResponseEntity
<
{{
pascalCase
codeName
}}
Dto>
update
{{
pascalCase
codeName
}}
(@ApiParam("
{{
appEntity
.
entity
.
keyField
.
logicName
}}
") @PathVariable("id")
{{
appEntity
.
entity
.
keyField
.
type
.
java
}}
{{
camelCase
appEntity
.
entity
.
keyField
.
codeName
}}
,@Validated @RequestBody
{{
pascalCase
codeName
}}
UpdateDto dto) {
public ResponseEntity
<
{{
pascalCase
codeName
}}
Dto>
update
{{
pascalCase
appEntity
.
codeName
}}{{
pascalCase
codeName
}}
(@ApiParam("
{{
appEntity
.
entity
.
keyField
.
logicName
}}
") @PathVariable("id")
{{
appEntity
.
entity
.
keyField
.
type
.
java
}}
{{
camelCase
appEntity
.
entity
.
keyField
.
codeName
}}
,@Validated @RequestBody
{{
pascalCase
codeName
}}
UpdateDto dto) {
return null;
}
{{/
each
}}
...
...
modules/ibizlab-template/ibizlab-template-ibizedge/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/service/impl/{{entities@SQL}}ServiceBase.java.hbs
浏览文件 @
10d71a9c
...
...
@@ -120,7 +120,7 @@ public class {{entity.codeName}}ServiceBase extends ServiceImpl<{{entity.codeNam
}
public Integer checkKey(
{{
entity
.
codeName
}}
et) {
return
this.count(Wrappers.
<
{{
entity
.
codeName
}}
>
query()
{{#
each
entity
.
keyFields
as
|
field
|
}}
.eq("
{{
lowerCase
field
.
name
}}
", et.get
{{
pascalCase
field
.
codeName
}}
())
{{/
each
}}
)>0
?1:0;
return
( (!ObjectUtils.isEmpty(et.get
{{
pascalCase
entity
.
keyField
.
codeName
}}
()))
&&
this.count(Wrappers.
<
{{
entity
.
codeName
}}
>
query()
{{#
each
entity
.
keyFields
as
|
field
|
}}
.eq("
{{
lowerCase
field
.
name
}}
", et.get
{{
pascalCase
field
.
codeName
}}
())
{{/
each
}}
)>0 )
?1:0;
}
@Override
...
...
@@ -239,7 +239,7 @@ public class {{entity.codeName}}ServiceBase extends ServiceImpl<{{entity.codeNam
{{#
eq
entity
.
actions
.
save
.
transactionMode
"GLOBAL"
}}
@GlobalTransactional
{{/
eq
}}{{#
eq
entity
.
actions
.
save
.
transactionMode
"DEFAULT"
}}
@Transactional
{{/
eq
}}
public boolean save(
{{
entity
.
codeName
}}
et) {
if(checkKey(et)
==
0)
if(checkKey(et)
>
0)
return getSelf().update(et);
else
return getSelf().create(et);
...
...
modules/ibizlab-template/ibizlab-template-r7/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/service/impl/{{entities@SQL}}ServiceImpl.java.hbs
浏览文件 @
10d71a9c
...
...
@@ -125,7 +125,7 @@ public class {{entity.codeName}}ServiceImpl extends ServiceImpl<{{entity.codeNam
}
public boolean checkKey(
{{
entity
.
codeName
}}
et) {
return this.count(Wrappers.
<
{{
entity
.
codeName
}}
>
query()
{{#
each
entity
.
keyFields
as
|
field
|
}}
.eq("
{{
lowerCase
field
.
name
}}
", et.get
{{
pascalCase
field
.
codeName
}}
())
{{/
each
}}
)>0;
return
(!ObjectUtils.isEmpty(et.get
{{
pascalCase
entity
.
keyField
.
codeName
}}
()))
&&
this.count(Wrappers.
<
{{
entity
.
codeName
}}
>
query()
{{#
each
entity
.
keyFields
as
|
field
|
}}
.eq("
{{
lowerCase
field
.
name
}}
", et.get
{{
pascalCase
field
.
codeName
}}
())
{{/
each
}}
)>0;
}
@Override
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录