Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
50b75251
提交
50b75251
编写于
4年前
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Mosher 发布系统代码 [后台服务,演示应用]
上级
c94f2b75
变更
7
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
319 行增加
和
150 行删除
+319
-150
ibizbooks.ts
app_Web/src/mock/entity/ibizbooks/ibizbooks.ts
+85
-127
ibizbook-service-base.ts
app_Web/src/service/ibizbook/ibizbook-service-base.ts
+120
-0
config.xml
config.xml
+0
-5
Dockerfile
demo-app/demo-app-web/src/main/docker/Dockerfile
+1
-1
demo-app-web.yaml
demo-app/demo-app-web/src/main/docker/demo-app-web.yaml
+1
-16
h2_table.xml
demo-core/src/main/resources/liquibase/h2_table.xml
+1
-1
IBIZBOOKResource.java
...c/main/java/cn/ibizlab/demoapi/rest/IBIZBOOKResource.java
+111
-0
未找到文件。
app_Web/src/mock/entity/ibizbooks/ibizbooks.ts
浏览文件 @
50b75251
此差异已折叠。
点击以展开。
app_Web/src/service/ibizbook/ibizbook-service-base.ts
浏览文件 @
50b75251
...
...
@@ -53,6 +53,123 @@ export default class IBIZBOOKServiceBase extends EntityService {
return
res
;
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZBOOKServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizbooks`
,
data
,
isloading
);
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZBOOKServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibizbooks/
${
context
.
ibizbook
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZBOOKServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/ibizbooks/
${
context
.
ibizbook
}
`
,
isloading
);
return
res
;
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZBOOKServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizbooks/
${
context
.
ibizbook
}
`
,
isloading
);
return
res
;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZBOOKServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizbooks/getdraft`
,
isloading
);
res
.
data
.
ibizbook
=
data
.
ibizbook
;
return
res
;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZBOOKServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/ibizbooks/
${
context
.
ibizbook
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZBOOKServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizbooks/
${
context
.
ibizbook
}
/save`
,
data
,
isloading
);
return
res
;
}
/**
* FetchDefault接口方法
*
...
...
@@ -63,5 +180,8 @@ export default class IBIZBOOKServiceBase extends EntityService {
* @memberof IBIZBOOKServiceBase
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
let
res
:
any
=
Http
.
getInstance
().
get
(
`/ibizbooks/fetchdefault`
,
tempData
,
isloading
);
return
res
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
config.xml
浏览文件 @
50b75251
...
...
@@ -37,11 +37,6 @@
git clone -b master $para2 demosys/
export NODE_OPTIONS=--max-old-space-size=4096
cd demosys/
mvn clean package -Pweb
cd demo-app/demo-app-web
mvn -Pweb docker:build
mvn -Pweb docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/demo-app-web.yaml iBizDemo --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
...
...
This diff is collapsed.
Click to expand it.
demo-app/demo-app-web/src/main/docker/Dockerfile
浏览文件 @
50b75251
...
...
@@ -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-app-web.jar
EXPOSE
51001
EXPOSE
8080
ADD
demo-app-web.jar /demo-app-web.jar
This diff is collapsed.
Click to expand it.
demo-app/demo-app-web/src/main/docker/demo-app-web.yaml
浏览文件 @
50b75251
...
...
@@ -3,24 +3,9 @@ services:
demo-app-web
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/demo-app-web:latest
ports
:
-
"
51001:51001
"
-
"
8080:8080
"
networks
:
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
-
SERVER_PORT=51001
-
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
:
...
...
This diff is collapsed.
Click to expand it.
demo-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
50b75251
...
...
@@ -28,7 +28,7 @@
<!--输出实体[IBIZBOOK]数据结构 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizbook-
68
-2"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizbook-
75
-2"
>
<createTable
tableName=
"T_IBIZBOOK"
>
<column
name=
"CREATEMAN"
remarks=
""
type=
"VARCHAR(60)"
>
</column>
...
...
This diff is collapsed.
Click to expand it.
demo-provider/demo-provider-demoapi/src/main/java/cn/ibizlab/demoapi/rest/IBIZBOOKResource.java
浏览文件 @
50b75251
...
...
@@ -47,6 +47,117 @@ public class IBIZBOOKResource {
@Lazy
public
IBIZBOOKMapping
ibizbookMapping
;
@PreAuthorize
(
"hasPermission(this.ibizbookMapping.toDomain(#ibizbookdto),'DemoSys-IBIZBOOK-Create')"
)
@ApiOperation
(
value
=
"新建图书"
,
tags
=
{
"图书"
},
notes
=
"新建图书"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizbooks"
)
public
ResponseEntity
<
IBIZBOOKDTO
>
create
(
@Validated
@RequestBody
IBIZBOOKDTO
ibizbookdto
)
{
IBIZBOOK
domain
=
ibizbookMapping
.
toDomain
(
ibizbookdto
);
ibizbookService
.
create
(
domain
);
IBIZBOOKDTO
dto
=
ibizbookMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.ibizbookMapping.toDomain(#ibizbookdtos),'DemoSys-IBIZBOOK-Create')"
)
@ApiOperation
(
value
=
"批量新建图书"
,
tags
=
{
"图书"
},
notes
=
"批量新建图书"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizbooks/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
IBIZBOOKDTO
>
ibizbookdtos
)
{
ibizbookService
.
createBatch
(
ibizbookMapping
.
toDomain
(
ibizbookdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@VersionCheck
(
entity
=
"ibizbook"
,
versionfield
=
"updatedate"
)
@PreAuthorize
(
"hasPermission(this.ibizbookService.get(#ibizbook_id),'DemoSys-IBIZBOOK-Update')"
)
@ApiOperation
(
value
=
"更新图书"
,
tags
=
{
"图书"
},
notes
=
"更新图书"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibizbooks/{ibizbook_id}"
)
public
ResponseEntity
<
IBIZBOOKDTO
>
update
(
@PathVariable
(
"ibizbook_id"
)
String
ibizbook_id
,
@RequestBody
IBIZBOOKDTO
ibizbookdto
)
{
IBIZBOOK
domain
=
ibizbookMapping
.
toDomain
(
ibizbookdto
);
domain
.
setIbizbookid
(
ibizbook_id
);
ibizbookService
.
update
(
domain
);
IBIZBOOKDTO
dto
=
ibizbookMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.ibizbookService.getIbizbookByEntities(this.ibizbookMapping.toDomain(#ibizbookdtos)),'DemoSys-IBIZBOOK-Update')"
)
@ApiOperation
(
value
=
"批量更新图书"
,
tags
=
{
"图书"
},
notes
=
"批量更新图书"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibizbooks/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
IBIZBOOKDTO
>
ibizbookdtos
)
{
ibizbookService
.
updateBatch
(
ibizbookMapping
.
toDomain
(
ibizbookdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.ibizbookService.get(#ibizbook_id),'DemoSys-IBIZBOOK-Remove')"
)
@ApiOperation
(
value
=
"删除图书"
,
tags
=
{
"图书"
},
notes
=
"删除图书"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibizbooks/{ibizbook_id}"
)
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"ibizbook_id"
)
String
ibizbook_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibizbookService
.
remove
(
ibizbook_id
));
}
@PreAuthorize
(
"hasPermission(this.ibizbookService.getIbizbookByIds(#ids),'DemoSys-IBIZBOOK-Remove')"
)
@ApiOperation
(
value
=
"批量删除图书"
,
tags
=
{
"图书"
},
notes
=
"批量删除图书"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibizbooks/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
ids
)
{
ibizbookService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PostAuthorize
(
"hasPermission(this.ibizbookMapping.toDomain(returnObject.body),'DemoSys-IBIZBOOK-Get')"
)
@ApiOperation
(
value
=
"获取图书"
,
tags
=
{
"图书"
},
notes
=
"获取图书"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibizbooks/{ibizbook_id}"
)
public
ResponseEntity
<
IBIZBOOKDTO
>
get
(
@PathVariable
(
"ibizbook_id"
)
String
ibizbook_id
)
{
IBIZBOOK
domain
=
ibizbookService
.
get
(
ibizbook_id
);
IBIZBOOKDTO
dto
=
ibizbookMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"获取图书草稿"
,
tags
=
{
"图书"
},
notes
=
"获取图书草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibizbooks/getdraft"
)
public
ResponseEntity
<
IBIZBOOKDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibizbookMapping
.
toDto
(
ibizbookService
.
getDraft
(
new
IBIZBOOK
())));
}
@ApiOperation
(
value
=
"检查图书"
,
tags
=
{
"图书"
},
notes
=
"检查图书"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizbooks/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
IBIZBOOKDTO
ibizbookdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibizbookService
.
checkKey
(
ibizbookMapping
.
toDomain
(
ibizbookdto
)));
}
@PreAuthorize
(
"hasPermission(this.ibizbookMapping.toDomain(#ibizbookdto),'DemoSys-IBIZBOOK-Save')"
)
@ApiOperation
(
value
=
"保存图书"
,
tags
=
{
"图书"
},
notes
=
"保存图书"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizbooks/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
IBIZBOOKDTO
ibizbookdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibizbookService
.
save
(
ibizbookMapping
.
toDomain
(
ibizbookdto
)));
}
@PreAuthorize
(
"hasPermission(this.ibizbookMapping.toDomain(#ibizbookdtos),'DemoSys-IBIZBOOK-Save')"
)
@ApiOperation
(
value
=
"批量保存图书"
,
tags
=
{
"图书"
},
notes
=
"批量保存图书"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizbooks/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatch
(
@RequestBody
List
<
IBIZBOOKDTO
>
ibizbookdtos
)
{
ibizbookService
.
saveBatch
(
ibizbookMapping
.
toDomain
(
ibizbookdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZBOOK-searchDefault-all') and hasPermission(#context,'DemoSys-IBIZBOOK-Get')"
)
@ApiOperation
(
value
=
"获取数据集"
,
tags
=
{
"图书"
}
,
notes
=
"获取数据集"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizbooks/fetchdefault"
)
public
ResponseEntity
<
List
<
IBIZBOOKDTO
>>
fetchDefault
(
IBIZBOOKSearchContext
context
)
{
Page
<
IBIZBOOK
>
domains
=
ibizbookService
.
searchDefault
(
context
)
;
List
<
IBIZBOOKDTO
>
list
=
ibizbookMapping
.
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-IBIZBOOK-searchDefault-all') and hasPermission(#context,'DemoSys-IBIZBOOK-Get')"
)
@ApiOperation
(
value
=
"查询数据集"
,
tags
=
{
"图书"
}
,
notes
=
"查询数据集"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizbooks/searchdefault"
)
public
ResponseEntity
<
Page
<
IBIZBOOKDTO
>>
searchDefault
(
@RequestBody
IBIZBOOKSearchContext
context
)
{
Page
<
IBIZBOOK
>
domains
=
ibizbookService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
ibizbookMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录