Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzuaa
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzuaa
提交
2712e6c0
提交
2712e6c0
编写于
6月 09, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码
上级
4db65b6e
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
185 行增加
和
19 行删除
+185
-19
config.xml
config.xml
+0
-5
Dockerfile
...a-provider/ibzuaa-provider-api/src/main/docker/Dockerfile
+1
-1
ibzuaa-provider-api.yaml
...uaa-provider-api/src/main/docker/ibzuaa-provider-api.yaml
+1
-13
SysPSSystemResource.java
...rc/main/java/cn/ibizlab/api/rest/SysPSSystemResource.java
+183
-0
未找到文件。
config.xml
浏览文件 @
2712e6c0
...
...
@@ -37,11 +37,6 @@
git clone -b master $para2 ibzuaa/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzuaa/
mvn clean package -Papi
cd ibzuaa-provider/ibzuaa-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzuaa-provider-api.yaml ibzlab-rt --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
...
...
ibzuaa-provider/ibzuaa-provider-api/src/main/docker/Dockerfile
浏览文件 @
2712e6c0
...
...
@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzuaa-provider-api.jar
EXPOSE
40002
EXPOSE
8081
ADD
ibzuaa-provider-api.jar /ibzuaa-provider-api.jar
ibzuaa-provider/ibzuaa-provider-api/src/main/docker/ibzuaa-provider-api.yaml
浏览文件 @
2712e6c0
...
...
@@ -3,21 +3,9 @@ services:
ibzuaa-provider-api
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzuaa-provider-api:latest
ports
:
-
"
40002:40002
"
-
"
8081:8081
"
networks
:
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
-
SERVER_PORT=40002
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211:8848
-
SPRING_REDIS_HOST=172.16.100.243
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
-
SPRING_DATASOURCE_PASSWORD=@6dEfb3@
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
deploy
:
resources
:
limits
:
...
...
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/rest/SysPSSystemResource.java
0 → 100644
浏览文件 @
2712e6c0
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.transaction.annotation.Transactional
;
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
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.uaa.domain.SysPSSystem
;
import
cn.ibizlab.core.uaa.service.ISysPSSystemService
;
import
cn.ibizlab.core.uaa.filter.SysPSSystemSearchContext
;
@Slf4j
@Api
(
tags
=
{
"系统"
})
@RestController
(
"api-syspssystem"
)
@RequestMapping
(
""
)
public
class
SysPSSystemResource
{
@Autowired
public
ISysPSSystemService
syspssystemService
;
@Autowired
@Lazy
public
SysPSSystemMapping
syspssystemMapping
;
@ApiOperation
(
value
=
"检查系统"
,
tags
=
{
"系统"
},
notes
=
"检查系统"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspssystems/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
SysPSSystemDTO
syspssystemdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
syspssystemService
.
checkKey
(
syspssystemMapping
.
toDomain
(
syspssystemdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPSSystem-Get-all')"
)
@ApiOperation
(
value
=
"获取系统"
,
tags
=
{
"系统"
},
notes
=
"获取系统"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/syspssystems/{syspssystem_id}"
)
public
ResponseEntity
<
SysPSSystemDTO
>
get
(
@PathVariable
(
"syspssystem_id"
)
String
syspssystem_id
)
{
SysPSSystem
domain
=
syspssystemService
.
get
(
syspssystem_id
);
SysPSSystemDTO
dto
=
syspssystemMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPSSystem-Create-all')"
)
@ApiOperation
(
value
=
"新建系统"
,
tags
=
{
"系统"
},
notes
=
"新建系统"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspssystems"
)
@Transactional
public
ResponseEntity
<
SysPSSystemDTO
>
create
(
@RequestBody
SysPSSystemDTO
syspssystemdto
)
{
SysPSSystem
domain
=
syspssystemMapping
.
toDomain
(
syspssystemdto
);
syspssystemService
.
create
(
domain
);
SysPSSystemDTO
dto
=
syspssystemMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPSSystem-Create-all')"
)
@ApiOperation
(
value
=
"批量新建系统"
,
tags
=
{
"系统"
},
notes
=
"批量新建系统"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspssystems/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
SysPSSystemDTO
>
syspssystemdtos
)
{
syspssystemService
.
createBatch
(
syspssystemMapping
.
toDomain
(
syspssystemdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"获取系统草稿"
,
tags
=
{
"系统"
},
notes
=
"获取系统草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/syspssystems/getdraft"
)
public
ResponseEntity
<
SysPSSystemDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
syspssystemMapping
.
toDto
(
syspssystemService
.
getDraft
(
new
SysPSSystem
())));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPSSystem-Remove-all')"
)
@ApiOperation
(
value
=
"删除系统"
,
tags
=
{
"系统"
},
notes
=
"删除系统"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/syspssystems/{syspssystem_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"syspssystem_id"
)
String
syspssystem_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
syspssystemService
.
remove
(
syspssystem_id
));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPSSystem-Remove-all')"
)
@ApiOperation
(
value
=
"批量删除系统"
,
tags
=
{
"系统"
},
notes
=
"批量删除系统"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/syspssystems/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
ids
)
{
syspssystemService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPSSystem-Save-all')"
)
@ApiOperation
(
value
=
"保存系统"
,
tags
=
{
"系统"
},
notes
=
"保存系统"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspssystems/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
SysPSSystemDTO
syspssystemdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
syspssystemService
.
save
(
syspssystemMapping
.
toDomain
(
syspssystemdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPSSystem-Save-all')"
)
@ApiOperation
(
value
=
"批量保存系统"
,
tags
=
{
"系统"
},
notes
=
"批量保存系统"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspssystems/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatch
(
@RequestBody
List
<
SysPSSystemDTO
>
syspssystemdtos
)
{
syspssystemService
.
saveBatch
(
syspssystemMapping
.
toDomain
(
syspssystemdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPSSystem-Update-all')"
)
@ApiOperation
(
value
=
"更新系统"
,
tags
=
{
"系统"
},
notes
=
"更新系统"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/syspssystems/{syspssystem_id}"
)
@Transactional
public
ResponseEntity
<
SysPSSystemDTO
>
update
(
@PathVariable
(
"syspssystem_id"
)
String
syspssystem_id
,
@RequestBody
SysPSSystemDTO
syspssystemdto
)
{
SysPSSystem
domain
=
syspssystemMapping
.
toDomain
(
syspssystemdto
);
domain
.
setPssystemid
(
syspssystem_id
);
syspssystemService
.
update
(
domain
);
SysPSSystemDTO
dto
=
syspssystemMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPSSystem-Update-all')"
)
@ApiOperation
(
value
=
"批量更新系统"
,
tags
=
{
"系统"
},
notes
=
"批量更新系统"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/syspssystems/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
SysPSSystemDTO
>
syspssystemdtos
)
{
syspssystemService
.
updateBatch
(
syspssystemMapping
.
toDomain
(
syspssystemdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPSSystem-Pick-all')"
)
@ApiOperation
(
value
=
"获取Pick"
,
tags
=
{
"系统"
}
,
notes
=
"获取Pick"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/syspssystems/fetchpick"
)
public
ResponseEntity
<
List
<
SysPSSystemDTO
>>
fetchPick
(
SysPSSystemSearchContext
context
)
{
Page
<
SysPSSystem
>
domains
=
syspssystemService
.
searchPick
(
context
)
;
List
<
SysPSSystemDTO
>
list
=
syspssystemMapping
.
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','ibzuaa-SysPSSystem-Pick-all')"
)
@ApiOperation
(
value
=
"查询Pick"
,
tags
=
{
"系统"
}
,
notes
=
"查询Pick"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspssystems/searchpick"
)
public
ResponseEntity
<
Page
<
SysPSSystemDTO
>>
searchPick
(
@RequestBody
SysPSSystemSearchContext
context
)
{
Page
<
SysPSSystem
>
domains
=
syspssystemService
.
searchPick
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
syspssystemMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPSSystem-Default-all')"
)
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"系统"
}
,
notes
=
"获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/syspssystems/fetchdefault"
)
public
ResponseEntity
<
List
<
SysPSSystemDTO
>>
fetchDefault
(
SysPSSystemSearchContext
context
)
{
Page
<
SysPSSystem
>
domains
=
syspssystemService
.
searchDefault
(
context
)
;
List
<
SysPSSystemDTO
>
list
=
syspssystemMapping
.
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','ibzuaa-SysPSSystem-Default-all')"
)
@ApiOperation
(
value
=
"查询DEFAULT"
,
tags
=
{
"系统"
}
,
notes
=
"查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspssystems/searchdefault"
)
public
ResponseEntity
<
Page
<
SysPSSystemDTO
>>
searchDefault
(
@RequestBody
SysPSSystemSearchContext
context
)
{
Page
<
SysPSSystem
>
domains
=
syspssystemService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
syspssystemMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录