Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
c9eb507c
提交
c9eb507c
编写于
12月 03, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Mosher 部署微服务接口 [后台服务,接口示例]
上级
71d2ccd1
变更
6
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
138 行增加
和
7 行删除
+138
-7
config.xml
config.xml
+5
-0
h2_table.xml
demo-core/src/main/resources/liquibase/h2_table.xml
+4
-4
view.xml
demo-core/src/main/resources/liquibase/view.xml
+1
-1
Dockerfile
...provider/demo-provider-demoapi/src/main/docker/Dockerfile
+1
-1
demo-provider-demoapi.yaml
...ovider-demoapi/src/main/docker/demo-provider-demoapi.yaml
+16
-1
IBIZVIEWMESSResource.java
...in/java/cn/ibizlab/demoapi/rest/IBIZVIEWMESSResource.java
+111
-0
未找到文件。
config.xml
浏览文件 @
c9eb507c
...
...
@@ -37,6 +37,11 @@
git clone -b master $para2 demosys/
export NODE_OPTIONS=--max-old-space-size=4096
cd demosys/
mvn clean package -Pdemoapi
cd demo-provider/demo-provider-demoapi
mvn -Pdemoapi docker:build
mvn -Pdemoapi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/demo-provider-demoapi.yaml iBizDemo --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
...
...
demo-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
c9eb507c
...
...
@@ -24,7 +24,7 @@
<!--输出实体[IBIZAPPVIEW]数据结构 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizappview-
28
-2"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizappview-
30
-2"
>
<createTable
tableName=
"T_IBIZAPPVIEW"
>
<column
name=
"IBIZAPPVIEWNAME"
remarks=
""
type=
"VARCHAR(200)"
>
</column>
...
...
@@ -74,7 +74,7 @@
<!--输出实体[IBIZBOOK]数据结构 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizbook-7
80
-4"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizbook-7
93
-4"
>
<createTable
tableName=
"T_IBIZBOOK"
>
<column
name=
"CREATEMAN"
remarks=
""
type=
"VARCHAR(60)"
>
</column>
...
...
@@ -178,7 +178,7 @@
<!--输出实体[IBIZCUSTOMER]数据结构 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizcustomer-2
7
-7"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizcustomer-2
8
-7"
>
<createTable
tableName=
"T_IBIZCUSTOMER"
>
<column
name=
"CREATEMAN"
remarks=
""
type=
"VARCHAR(60)"
>
</column>
...
...
@@ -1156,7 +1156,7 @@
<!--输出实体[IBIZVIEWMESS]数据结构 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizviewmess-
3
-40"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizviewmess-
20
-40"
>
<createTable
tableName=
"T_IBIZVIEWMESS"
>
<column
name=
"IBIZVIEWMESSNAME"
remarks=
""
type=
"VARCHAR(200)"
>
</column>
...
...
demo-core/src/main/resources/liquibase/view.xml
浏览文件 @
c9eb507c
...
...
@@ -19,7 +19,7 @@
</createView>
</changeSet>
<!--输出实体[IBIZCUSTOMER]视图结构信息 runOnChange="true" 当视图发生变更时,通过liquibase强刷prod的视图,实现视图的同步-->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"view-ibizcustomer-2
7
-4"
runOnChange=
"true"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"view-ibizcustomer-2
8
-4"
runOnChange=
"true"
>
<createView
fullDefinition=
"false"
replaceIfExists=
"true"
viewName=
"V_IBIZCUSTOMER"
>
<![CDATA[ SELECT t1.[ADDRESS], t1.[CREATEDATE], t1.[CREATEMAN], t1.[CUSTOMERUID], t1.[IBIZCUSTOMERID], t1.[IBIZCUSTOMERNAME], t1.[SN], t1.[UPDATEDATE], t1.[UPDATEMAN] FROM [T_IBIZCUSTOMER] t1 ]]>
</createView>
...
...
demo-provider/demo-provider-demoapi/src/main/docker/Dockerfile
浏览文件 @
c9eb507c
...
...
@@ -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 /demo-provider-demoapi.jar
EXPOSE
8081
EXPOSE
51000
ADD
demo-provider-demoapi.jar /demo-provider-demoapi.jar
demo-provider/demo-provider-demoapi/src/main/docker/demo-provider-demoapi.yaml
浏览文件 @
c9eb507c
...
...
@@ -3,9 +3,24 @@ services:
demo-provider-demoapi
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/demo-provider-demoapi:latest
ports
:
-
"
8081:8081
"
-
"
51000:51000
"
networks
:
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
-
SERVER_PORT=51000
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
-
SPRING_REDIS_HOST=172.16.240.110
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_LAB01_df847bdfd
-
SPRING_DATASOURCE_PASSWORD=3d6@460A
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_df847bdfd?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_df847bdfd
-
NACOS=172.16.240.110:8848
-
SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
-
SEATA_ENABLED=true
deploy
:
resources
:
limits
:
...
...
demo-provider/demo-provider-demoapi/src/main/java/cn/ibizlab/demoapi/rest/IBIZVIEWMESSResource.java
浏览文件 @
c9eb507c
...
...
@@ -47,6 +47,117 @@ public class IBIZVIEWMESSResource {
@Lazy
public
IBIZVIEWMESSMapping
ibizviewmessMapping
;
@PreAuthorize
(
"hasPermission(this.ibizviewmessMapping.toDomain(#ibizviewmessdto),'DemoSys-IBIZVIEWMESS-Create')"
)
@ApiOperation
(
value
=
"新建视图数据信息实体"
,
tags
=
{
"视图数据信息实体"
},
notes
=
"新建视图数据信息实体"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizviewmesses"
)
public
ResponseEntity
<
IBIZVIEWMESSDTO
>
create
(
@Validated
@RequestBody
IBIZVIEWMESSDTO
ibizviewmessdto
)
{
IBIZVIEWMESS
domain
=
ibizviewmessMapping
.
toDomain
(
ibizviewmessdto
);
ibizviewmessService
.
create
(
domain
);
IBIZVIEWMESSDTO
dto
=
ibizviewmessMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.ibizviewmessMapping.toDomain(#ibizviewmessdtos),'DemoSys-IBIZVIEWMESS-Create')"
)
@ApiOperation
(
value
=
"批量新建视图数据信息实体"
,
tags
=
{
"视图数据信息实体"
},
notes
=
"批量新建视图数据信息实体"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizviewmesses/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
IBIZVIEWMESSDTO
>
ibizviewmessdtos
)
{
ibizviewmessService
.
createBatch
(
ibizviewmessMapping
.
toDomain
(
ibizviewmessdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@VersionCheck
(
entity
=
"ibizviewmess"
,
versionfield
=
"updatedate"
)
@PreAuthorize
(
"hasPermission(this.ibizviewmessService.get(#ibizviewmess_id),'DemoSys-IBIZVIEWMESS-Update')"
)
@ApiOperation
(
value
=
"更新视图数据信息实体"
,
tags
=
{
"视图数据信息实体"
},
notes
=
"更新视图数据信息实体"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibizviewmesses/{ibizviewmess_id}"
)
public
ResponseEntity
<
IBIZVIEWMESSDTO
>
update
(
@PathVariable
(
"ibizviewmess_id"
)
String
ibizviewmess_id
,
@RequestBody
IBIZVIEWMESSDTO
ibizviewmessdto
)
{
IBIZVIEWMESS
domain
=
ibizviewmessMapping
.
toDomain
(
ibizviewmessdto
);
domain
.
setIbizviewmessid
(
ibizviewmess_id
);
ibizviewmessService
.
update
(
domain
);
IBIZVIEWMESSDTO
dto
=
ibizviewmessMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.ibizviewmessService.getIbizviewmessByEntities(this.ibizviewmessMapping.toDomain(#ibizviewmessdtos)),'DemoSys-IBIZVIEWMESS-Update')"
)
@ApiOperation
(
value
=
"批量更新视图数据信息实体"
,
tags
=
{
"视图数据信息实体"
},
notes
=
"批量更新视图数据信息实体"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibizviewmesses/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
IBIZVIEWMESSDTO
>
ibizviewmessdtos
)
{
ibizviewmessService
.
updateBatch
(
ibizviewmessMapping
.
toDomain
(
ibizviewmessdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.ibizviewmessService.get(#ibizviewmess_id),'DemoSys-IBIZVIEWMESS-Remove')"
)
@ApiOperation
(
value
=
"删除视图数据信息实体"
,
tags
=
{
"视图数据信息实体"
},
notes
=
"删除视图数据信息实体"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibizviewmesses/{ibizviewmess_id}"
)
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"ibizviewmess_id"
)
String
ibizviewmess_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibizviewmessService
.
remove
(
ibizviewmess_id
));
}
@PreAuthorize
(
"hasPermission(this.ibizviewmessService.getIbizviewmessByIds(#ids),'DemoSys-IBIZVIEWMESS-Remove')"
)
@ApiOperation
(
value
=
"批量删除视图数据信息实体"
,
tags
=
{
"视图数据信息实体"
},
notes
=
"批量删除视图数据信息实体"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibizviewmesses/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
ids
)
{
ibizviewmessService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PostAuthorize
(
"hasPermission(this.ibizviewmessMapping.toDomain(returnObject.body),'DemoSys-IBIZVIEWMESS-Get')"
)
@ApiOperation
(
value
=
"获取视图数据信息实体"
,
tags
=
{
"视图数据信息实体"
},
notes
=
"获取视图数据信息实体"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibizviewmesses/{ibizviewmess_id}"
)
public
ResponseEntity
<
IBIZVIEWMESSDTO
>
get
(
@PathVariable
(
"ibizviewmess_id"
)
String
ibizviewmess_id
)
{
IBIZVIEWMESS
domain
=
ibizviewmessService
.
get
(
ibizviewmess_id
);
IBIZVIEWMESSDTO
dto
=
ibizviewmessMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"获取视图数据信息实体草稿"
,
tags
=
{
"视图数据信息实体"
},
notes
=
"获取视图数据信息实体草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibizviewmesses/getdraft"
)
public
ResponseEntity
<
IBIZVIEWMESSDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibizviewmessMapping
.
toDto
(
ibizviewmessService
.
getDraft
(
new
IBIZVIEWMESS
())));
}
@ApiOperation
(
value
=
"检查视图数据信息实体"
,
tags
=
{
"视图数据信息实体"
},
notes
=
"检查视图数据信息实体"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizviewmesses/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
IBIZVIEWMESSDTO
ibizviewmessdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibizviewmessService
.
checkKey
(
ibizviewmessMapping
.
toDomain
(
ibizviewmessdto
)));
}
@PreAuthorize
(
"hasPermission(this.ibizviewmessMapping.toDomain(#ibizviewmessdto),'DemoSys-IBIZVIEWMESS-Save')"
)
@ApiOperation
(
value
=
"保存视图数据信息实体"
,
tags
=
{
"视图数据信息实体"
},
notes
=
"保存视图数据信息实体"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizviewmesses/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
IBIZVIEWMESSDTO
ibizviewmessdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibizviewmessService
.
save
(
ibizviewmessMapping
.
toDomain
(
ibizviewmessdto
)));
}
@PreAuthorize
(
"hasPermission(this.ibizviewmessMapping.toDomain(#ibizviewmessdtos),'DemoSys-IBIZVIEWMESS-Save')"
)
@ApiOperation
(
value
=
"批量保存视图数据信息实体"
,
tags
=
{
"视图数据信息实体"
},
notes
=
"批量保存视图数据信息实体"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizviewmesses/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatch
(
@RequestBody
List
<
IBIZVIEWMESSDTO
>
ibizviewmessdtos
)
{
ibizviewmessService
.
saveBatch
(
ibizviewmessMapping
.
toDomain
(
ibizviewmessdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZVIEWMESS-searchDefault-all') and hasPermission(#context,'DemoSys-IBIZVIEWMESS-Get')"
)
@ApiOperation
(
value
=
"获取数据集"
,
tags
=
{
"视图数据信息实体"
}
,
notes
=
"获取数据集"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibizviewmesses/fetchdefault"
)
public
ResponseEntity
<
List
<
IBIZVIEWMESSDTO
>>
fetchDefault
(
IBIZVIEWMESSSearchContext
context
)
{
Page
<
IBIZVIEWMESS
>
domains
=
ibizviewmessService
.
searchDefault
(
context
)
;
List
<
IBIZVIEWMESSDTO
>
list
=
ibizviewmessMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZVIEWMESS-searchDefault-all') and hasPermission(#context,'DemoSys-IBIZVIEWMESS-Get')"
)
@ApiOperation
(
value
=
"查询数据集"
,
tags
=
{
"视图数据信息实体"
}
,
notes
=
"查询数据集"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizviewmesses/searchdefault"
)
public
ResponseEntity
<
Page
<
IBIZVIEWMESSDTO
>>
searchDefault
(
@RequestBody
IBIZVIEWMESSSearchContext
context
)
{
Page
<
IBIZVIEWMESS
>
domains
=
ibizviewmessService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
ibizviewmessMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录