Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzlite
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzlite
提交
fdf0e4e4
提交
fdf0e4e4
编写于
9月 15, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zhouweidong 发布系统代码
上级
081bcf8d
变更
4
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
287 行增加
和
1 行删除
+287
-1
h2_table.xml
ibzlite-core/src/main/resources/liquibase/h2_table.xml
+1
-1
DstSystemDTO.java
...er-api/src/main/java/cn/ibizlab/api/dto/DstSystemDTO.java
+110
-0
DstSystemMapping.java
...rc/main/java/cn/ibizlab/api/mapping/DstSystemMapping.java
+16
-0
DstSystemResource.java
.../src/main/java/cn/ibizlab/api/rest/DstSystemResource.java
+160
-0
未找到文件。
ibzlite-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
fdf0e4e4
...
@@ -94,7 +94,7 @@
...
@@ -94,7 +94,7 @@
<!--输出实体[DST_SYSTEM]数据结构 -->
<!--输出实体[DST_SYSTEM]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-dst_system-2
6
-5"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-dst_system-2
9
-5"
>
<createTable
tableName=
"IBZPSSYSTEM"
>
<createTable
tableName=
"IBZPSSYSTEM"
>
<column
name=
"PSSYSTEMID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"PSSYSTEMID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DST_SYSTEM_PSSYSTEMID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DST_SYSTEM_PSSYSTEMID"
/>
...
...
ibzlite-provider/ibzlite-provider-api/src/main/java/cn/ibizlab/api/dto/DstSystemDTO.java
0 → 100644
浏览文件 @
fdf0e4e4
package
cn
.
ibizlab
.
api
.
dto
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.math.BigInteger
;
import
java.util.Map
;
import
java.util.HashMap
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
cn.ibizlab.util.domain.DTOBase
;
import
cn.ibizlab.util.domain.DTOClient
;
import
lombok.Data
;
/**
* 服务DTO对象[DstSystemDTO]
*/
@Data
public
class
DstSystemDTO
extends
DTOBase
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 属性 [PSSYSTEMID]
*
*/
@JSONField
(
name
=
"pssystemid"
)
@JsonProperty
(
"pssystemid"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
private
String
pssystemid
;
/**
* 属性 [PSSYSTEMNAME]
*
*/
@JSONField
(
name
=
"pssystemname"
)
@JsonProperty
(
"pssystemname"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
private
String
pssystemname
;
/**
* 属性 [SYSSTRUCTURE]
*
*/
@JSONField
(
name
=
"sysstructure"
)
@JsonProperty
(
"sysstructure"
)
@Size
(
min
=
0
,
max
=
1048576
,
message
=
"内容长度必须小于等于[1048576]"
)
private
String
sysstructure
;
/**
* 属性 [MD5CHECK]
*
*/
@JSONField
(
name
=
"md5check"
)
@JsonProperty
(
"md5check"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
private
String
md5check
;
/**
* 属性 [SHOWORDER]
*
*/
@JSONField
(
name
=
"showorder"
)
@JsonProperty
(
"showorder"
)
private
Integer
showorder
;
/**
* 设置 [PSSYSTEMNAME]
*/
public
void
setPssystemname
(
String
pssystemname
){
this
.
pssystemname
=
pssystemname
;
this
.
modify
(
"pssystemname"
,
pssystemname
);
}
/**
* 设置 [SYSSTRUCTURE]
*/
public
void
setSysstructure
(
String
sysstructure
){
this
.
sysstructure
=
sysstructure
;
this
.
modify
(
"sysstructure"
,
sysstructure
);
}
/**
* 设置 [MD5CHECK]
*/
public
void
setMd5check
(
String
md5check
){
this
.
md5check
=
md5check
;
this
.
modify
(
"md5check"
,
md5check
);
}
/**
* 设置 [SHOWORDER]
*/
public
void
setShoworder
(
Integer
showorder
){
this
.
showorder
=
showorder
;
this
.
modify
(
"showorder"
,
showorder
);
}
}
ibzlite-provider/ibzlite-provider-api/src/main/java/cn/ibizlab/api/mapping/DstSystemMapping.java
0 → 100644
浏览文件 @
fdf0e4e4
package
cn
.
ibizlab
.
api
.
mapping
;
import
org.mapstruct.*
;
import
cn.ibizlab.core.lite.domain.DstSystem
;
import
cn.ibizlab.api.dto.DstSystemDTO
;
import
cn.ibizlab.util.domain.MappingBase
;
import
org.mapstruct.factory.Mappers
;
@Mapper
(
componentModel
=
"spring"
,
uses
=
{},
implementationName
=
"apiDstSystemMapping"
,
nullValuePropertyMappingStrategy
=
NullValuePropertyMappingStrategy
.
IGNORE
,
nullValueCheckStrategy
=
NullValueCheckStrategy
.
ALWAYS
)
public
interface
DstSystemMapping
extends
MappingBase
<
DstSystemDTO
,
DstSystem
>
{
}
ibzlite-provider/ibzlite-provider-api/src/main/java/cn/ibizlab/api/rest/DstSystemResource.java
0 → 100644
浏览文件 @
fdf0e4e4
package
cn
.
ibizlab
.
api
.
rest
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.math.BigInteger
;
import
java.util.HashMap
;
import
lombok.extern.slf4j.Slf4j
;
import
com.alibaba.fastjson.JSONObject
;
import
javax.servlet.ServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cglib.beans.BeanCopier
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.util.StringUtils
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PostAuthorize
;
import
org.springframework.validation.annotation.Validated
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponses
;
import
cn.ibizlab.api.dto.*
;
import
cn.ibizlab.api.mapping.*
;
import
cn.ibizlab.core.lite.domain.DstSystem
;
import
cn.ibizlab.core.lite.service.IDstSystemService
;
import
cn.ibizlab.core.lite.filter.DstSystemSearchContext
;
import
cn.ibizlab.util.annotation.VersionCheck
;
@Slf4j
@Api
(
tags
=
{
"系统"
})
@RestController
(
"api-dstsystem"
)
@RequestMapping
(
""
)
public
class
DstSystemResource
{
@Autowired
public
IDstSystemService
dstsystemService
;
@Autowired
@Lazy
public
DstSystemMapping
dstsystemMapping
;
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstSystem-Create-all')"
)
@ApiOperation
(
value
=
"新建系统"
,
tags
=
{
"系统"
},
notes
=
"新建系统"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dstsystems"
)
public
ResponseEntity
<
DstSystemDTO
>
create
(
@Validated
@RequestBody
DstSystemDTO
dstsystemdto
)
{
DstSystem
domain
=
dstsystemMapping
.
toDomain
(
dstsystemdto
);
dstsystemService
.
create
(
domain
);
DstSystemDTO
dto
=
dstsystemMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstSystem-Create-all')"
)
@ApiOperation
(
value
=
"批量新建系统"
,
tags
=
{
"系统"
},
notes
=
"批量新建系统"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dstsystems/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
DstSystemDTO
>
dstsystemdtos
)
{
dstsystemService
.
createBatch
(
dstsystemMapping
.
toDomain
(
dstsystemdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstSystem-Update-all')"
)
@ApiOperation
(
value
=
"更新系统"
,
tags
=
{
"系统"
},
notes
=
"更新系统"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/dstsystems/{dstsystem_id}"
)
public
ResponseEntity
<
DstSystemDTO
>
update
(
@PathVariable
(
"dstsystem_id"
)
String
dstsystem_id
,
@RequestBody
DstSystemDTO
dstsystemdto
)
{
DstSystem
domain
=
dstsystemMapping
.
toDomain
(
dstsystemdto
);
domain
.
setPssystemid
(
dstsystem_id
);
dstsystemService
.
update
(
domain
);
DstSystemDTO
dto
=
dstsystemMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstSystem-Update-all')"
)
@ApiOperation
(
value
=
"批量更新系统"
,
tags
=
{
"系统"
},
notes
=
"批量更新系统"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/dstsystems/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
DstSystemDTO
>
dstsystemdtos
)
{
dstsystemService
.
updateBatch
(
dstsystemMapping
.
toDomain
(
dstsystemdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstSystem-Remove-all')"
)
@ApiOperation
(
value
=
"删除系统"
,
tags
=
{
"系统"
},
notes
=
"删除系统"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/dstsystems/{dstsystem_id}"
)
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"dstsystem_id"
)
String
dstsystem_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dstsystemService
.
remove
(
dstsystem_id
));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstSystem-Remove-all')"
)
@ApiOperation
(
value
=
"批量删除系统"
,
tags
=
{
"系统"
},
notes
=
"批量删除系统"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/dstsystems/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
ids
)
{
dstsystemService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstSystem-Get-all')"
)
@ApiOperation
(
value
=
"获取系统"
,
tags
=
{
"系统"
},
notes
=
"获取系统"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/dstsystems/{dstsystem_id}"
)
public
ResponseEntity
<
DstSystemDTO
>
get
(
@PathVariable
(
"dstsystem_id"
)
String
dstsystem_id
)
{
DstSystem
domain
=
dstsystemService
.
get
(
dstsystem_id
);
DstSystemDTO
dto
=
dstsystemMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"获取系统草稿"
,
tags
=
{
"系统"
},
notes
=
"获取系统草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/dstsystems/getdraft"
)
public
ResponseEntity
<
DstSystemDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dstsystemMapping
.
toDto
(
dstsystemService
.
getDraft
(
new
DstSystem
())));
}
@ApiOperation
(
value
=
"检查系统"
,
tags
=
{
"系统"
},
notes
=
"检查系统"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dstsystems/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
DstSystemDTO
dstsystemdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dstsystemService
.
checkKey
(
dstsystemMapping
.
toDomain
(
dstsystemdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstSystem-Save-all')"
)
@ApiOperation
(
value
=
"保存系统"
,
tags
=
{
"系统"
},
notes
=
"保存系统"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dstsystems/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
DstSystemDTO
dstsystemdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dstsystemService
.
save
(
dstsystemMapping
.
toDomain
(
dstsystemdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstSystem-Save-all')"
)
@ApiOperation
(
value
=
"批量保存系统"
,
tags
=
{
"系统"
},
notes
=
"批量保存系统"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dstsystems/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatch
(
@RequestBody
List
<
DstSystemDTO
>
dstsystemdtos
)
{
dstsystemService
.
saveBatch
(
dstsystemMapping
.
toDomain
(
dstsystemdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstSystem-searchDefault-all')"
)
@ApiOperation
(
value
=
"获取数据集"
,
tags
=
{
"系统"
}
,
notes
=
"获取数据集"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/dstsystems/fetchdefault"
)
public
ResponseEntity
<
List
<
DstSystemDTO
>>
fetchDefault
(
DstSystemSearchContext
context
)
{
Page
<
DstSystem
>
domains
=
dstsystemService
.
searchDefault
(
context
)
;
List
<
DstSystemDTO
>
list
=
dstsystemMapping
.
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','ibzlite-DstSystem-searchDefault-all')"
)
@ApiOperation
(
value
=
"查询数据集"
,
tags
=
{
"系统"
}
,
notes
=
"查询数据集"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dstsystems/searchdefault"
)
public
ResponseEntity
<
Page
<
DstSystemDTO
>>
searchDefault
(
@RequestBody
DstSystemSearchContext
context
)
{
Page
<
DstSystem
>
domains
=
dstsystemService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
dstsystemMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录