提交 ebebabc4 编写于 作者: ibizdev's avatar ibizdev

ibizdev提交

上级 da99b3a4
......@@ -38,6 +38,11 @@
git clone -b master $para2 ibzou/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzou/
mvn clean package -Papi
cd ibzou-provider/ibzou-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzou-provider-api.yaml dev --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
......@@ -16,5 +16,9 @@ zuul:
path: /ibzorganizations/**
serviceId: ibzou-api
stripPrefix: false
wfcore:
path: /wfcore/**
serviceId: ibzwf-api
stripPrefix: false
sensitive-headers:
- Cookie,Set-Cookie,Authorization
server:
port: 8080
\ No newline at end of file
port: 40001
......@@ -2,29 +2,26 @@
{
"predefineddatarange":[{"id":"ALL","name":"全部数据"},{"id":"CURORG","name":"当前单位"},{"id":"PORG","name":"上级单位"},{"id":"SORG","name":"下级单位"},{"id":"CURORGDEPT","name":"当前部门"},{"id":"PORGDEPT","name":"上级部门"},{"id":"SORGDEPT","name":"下级部门"}],
"entities":[
{
"dename":"IBZDepartment",
"delogicname":"部门",
"sysmoudle":{"id":"OU","name":"ou"},
"dedataset":[{"id":"Default","name":"默认数据集"}],
"deaction":[{"id":"CREATE","name":"新建","type":"BUILTIN"},{"id":"UPDATE","name":"编辑","type":"BUILTIN"},{"id":"READ","name":"读取","type":"BUILTIN"},{"id":"DELETE","name":"删除","type":"BUILTIN"},{"id":"CUSTOM","name":"自定义行为","type":"USERCUSTOM"}]
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" }]
}
,
{
, {
"dename":"IBZEmployee",
"delogicname":"人员",
"sysmoudle":{"id":"OU","name":"ou"},
"dedataset":[{"id":"Default","name":"默认数据集"}],
"deaction":[{"id":"CREATE","name":"新建","type":"BUILTIN"},{"id":"UPDATE","name":"编辑","type":"BUILTIN"},{"id":"READ","name":"读取","type":"BUILTIN"},{"id":"DELETE","name":"删除","type":"BUILTIN"},{"id":"CUSTOM","name":"自定义行为","type":"USERCUSTOM"}]
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"InitPwd" , "name":"初始化密码" , "type":"USERCUSTOM" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" }]
}
,
{
, {
"dename":"IBZOrganization",
"delogicname":"单位机构",
"sysmoudle":{"id":"OU","name":"ou"},
"dedataset":[{"id":"Default","name":"默认数据集"}],
"deaction":[{"id":"CREATE","name":"新建","type":"BUILTIN"},{"id":"UPDATE","name":"编辑","type":"BUILTIN"},{"id":"READ","name":"读取","type":"BUILTIN"},{"id":"DELETE","name":"删除","type":"BUILTIN"},{"id":"CUSTOM","name":"自定义行为","type":"USERCUSTOM"}]
"dedataset":[{"id":"SelectSOrg" , "name":"查询下级单位"},{"id":"SelectPOrg" , "name":"查询上级单位"},{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" }]
}
]
......
......@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-provider-api.jar
EXPOSE 8081
EXPOSE 40001
ADD ibzou-provider-api.jar /ibzou-provider-api.jar
......@@ -3,9 +3,11 @@ services:
ibzou-provider-api:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-provider-api:latest
ports:
- "8081:8081"
- "40001:40001"
networks:
- agent_network
environment:
SPRING_CLOUD_NACOS_DISCOVERY_IP: 172.16.180.237
deploy:
mode: replicated
replicas: 1
......
......@@ -55,7 +55,7 @@ public class IBZDepartmentResource {
@PreAuthorize("hasPermission('','CREATE',this.getEntity())")
@PreAuthorize("hasPermission('','Create',this.getEntity())")
@ApiOperation(value = "Create", tags = {"IBZDepartment" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments")
@Transactional
......@@ -66,7 +66,7 @@ public class IBZDepartmentResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission('','CREATE',this.getEntity())")
@PreAuthorize("hasPermission('','Create',this.getEntity())")
@ApiOperation(value = "createBatch", tags = {"createBatch" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/createbatch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) {
......@@ -77,7 +77,7 @@ public class IBZDepartmentResource {
@PreAuthorize("hasPermission(#ibzdepartment_id,'READ',this.getEntity())")
@PreAuthorize("hasPermission(#ibzdepartment_id,'Get',this.getEntity())")
@ApiOperation(value = "Get", tags = {"IBZDepartment" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}")
public ResponseEntity<IBZDepartmentDTO> get(@PathVariable("ibzdepartment_id") String ibzdepartment_id) {
......@@ -123,7 +123,7 @@ public class IBZDepartmentResource {
@PreAuthorize("hasPermission('DELETE',{#ibzdepartment_id,this.getEntity()})")
@PreAuthorize("hasPermission('Remove',{#ibzdepartment_id,this.getEntity()})")
@ApiOperation(value = "Remove", tags = {"IBZDepartment" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}")
@Transactional
......@@ -141,7 +141,7 @@ public class IBZDepartmentResource {
@PreAuthorize("hasPermission(#ibzdepartment_id,'UPDATE',this.getEntity())")
@PreAuthorize("hasPermission(#ibzdepartment_id,'Update',this.getEntity())")
@ApiOperation(value = "Update", tags = {"IBZDepartment" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}")
@Transactional
......@@ -153,7 +153,7 @@ public class IBZDepartmentResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(#ibzdepartment_id,'UPDATE',this.getEntity())")
@PreAuthorize("hasPermission(#ibzdepartment_id,'Update',this.getEntity())")
@ApiOperation(value = "UpdateBatch", tags = {"UpdateBatch" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/updatebatch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) {
......@@ -161,7 +161,7 @@ public class IBZDepartmentResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission('READ',{#context,'Default',this.getEntity()})")
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity()})")
@ApiOperation(value = "fetchDEFAULT", tags = {"IBZDepartment" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/fetchdefault")
public ResponseEntity<List<IBZDepartmentDTO>> fetchDefault(IBZDepartmentSearchContext context) {
......@@ -174,7 +174,7 @@ public class IBZDepartmentResource {
.body(list);
}
@PreAuthorize("hasPermission('READ',{#context,'Default',this.getEntity()})")
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity()})")
@ApiOperation(value = "searchDEFAULT", tags = {"IBZDepartment" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/searchdefault")
public ResponseEntity<Page<IBZDepartmentDTO>> searchDefault(IBZDepartmentSearchContext context) {
......
......@@ -55,7 +55,7 @@ public class IBZEmployeeResource {
@PreAuthorize("hasPermission('DELETE',{#ibzemployee_id,this.getEntity()})")
@PreAuthorize("hasPermission('Remove',{#ibzemployee_id,this.getEntity()})")
@ApiOperation(value = "Remove", tags = {"IBZEmployee" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/{ibzemployee_id}")
@Transactional
......@@ -86,7 +86,7 @@ public class IBZEmployeeResource {
@PreAuthorize("hasPermission('','CREATE',this.getEntity())")
@PreAuthorize("hasPermission('','Create',this.getEntity())")
@ApiOperation(value = "Create", tags = {"IBZEmployee" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees")
@Transactional
......@@ -97,7 +97,7 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission('','CREATE',this.getEntity())")
@PreAuthorize("hasPermission('','Create',this.getEntity())")
@ApiOperation(value = "createBatch", tags = {"createBatch" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/createbatch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
......@@ -117,7 +117,7 @@ public class IBZEmployeeResource {
@PreAuthorize("hasPermission(#ibzemployee_id,'UPDATE',this.getEntity())")
@PreAuthorize("hasPermission(#ibzemployee_id,'Update',this.getEntity())")
@ApiOperation(value = "Update", tags = {"IBZEmployee" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/{ibzemployee_id}")
@Transactional
......@@ -129,7 +129,7 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(#ibzemployee_id,'UPDATE',this.getEntity())")
@PreAuthorize("hasPermission(#ibzemployee_id,'Update',this.getEntity())")
@ApiOperation(value = "UpdateBatch", tags = {"UpdateBatch" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/updatebatch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
......@@ -156,7 +156,7 @@ public class IBZEmployeeResource {
@PreAuthorize("hasPermission(#ibzemployee_id,'READ',this.getEntity())")
@PreAuthorize("hasPermission(#ibzemployee_id,'Get',this.getEntity())")
@ApiOperation(value = "Get", tags = {"IBZEmployee" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/ibzemployees/{ibzemployee_id}")
public ResponseEntity<IBZEmployeeDTO> get(@PathVariable("ibzemployee_id") String ibzemployee_id) {
......@@ -174,7 +174,7 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeMapping.toDto(ibzemployeeService.getDraft(new IBZEmployee())));
}
@PreAuthorize("hasPermission('READ',{#context,'Default',this.getEntity()})")
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity()})")
@ApiOperation(value = "fetchDEFAULT", tags = {"IBZEmployee" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzemployees/fetchdefault")
public ResponseEntity<List<IBZEmployeeDTO>> fetchDefault(IBZEmployeeSearchContext context) {
......@@ -187,7 +187,7 @@ public class IBZEmployeeResource {
.body(list);
}
@PreAuthorize("hasPermission('READ',{#context,'Default',this.getEntity()})")
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity()})")
@ApiOperation(value = "searchDEFAULT", tags = {"IBZEmployee" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzemployees/searchdefault")
public ResponseEntity<Page<IBZEmployeeDTO>> searchDefault(IBZEmployeeSearchContext context) {
......
......@@ -64,7 +64,7 @@ public class IBZOrganizationResource {
@PreAuthorize("hasPermission(#ibzorganization_id,'UPDATE',this.getEntity())")
@PreAuthorize("hasPermission(#ibzorganization_id,'Update',this.getEntity())")
@ApiOperation(value = "Update", tags = {"IBZOrganization" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}")
@Transactional
......@@ -76,7 +76,7 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(#ibzorganization_id,'UPDATE',this.getEntity())")
@PreAuthorize("hasPermission(#ibzorganization_id,'Update',this.getEntity())")
@ApiOperation(value = "UpdateBatch", tags = {"UpdateBatch" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/updatebatch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) {
......@@ -87,7 +87,7 @@ public class IBZOrganizationResource {
@PreAuthorize("hasPermission('','CREATE',this.getEntity())")
@PreAuthorize("hasPermission('','Create',this.getEntity())")
@ApiOperation(value = "Create", tags = {"IBZOrganization" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations")
@Transactional
......@@ -98,7 +98,7 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission('','CREATE',this.getEntity())")
@PreAuthorize("hasPermission('','Create',this.getEntity())")
@ApiOperation(value = "createBatch", tags = {"createBatch" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/createbatch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) {
......@@ -125,7 +125,7 @@ public class IBZOrganizationResource {
@PreAuthorize("hasPermission('DELETE',{#ibzorganization_id,this.getEntity()})")
@PreAuthorize("hasPermission('Remove',{#ibzorganization_id,this.getEntity()})")
@ApiOperation(value = "Remove", tags = {"IBZOrganization" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}")
@Transactional
......@@ -143,7 +143,7 @@ public class IBZOrganizationResource {
@PreAuthorize("hasPermission(#ibzorganization_id,'READ',this.getEntity())")
@PreAuthorize("hasPermission(#ibzorganization_id,'Get',this.getEntity())")
@ApiOperation(value = "Get", tags = {"IBZOrganization" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}")
public ResponseEntity<IBZOrganizationDTO> get(@PathVariable("ibzorganization_id") String ibzorganization_id) {
......@@ -161,7 +161,7 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationMapping.toDto(ibzorganizationService.getDraft(new IBZOrganization())));
}
@PreAuthorize("hasPermission('READ',{#context,'SelectSOrg',this.getEntity()})")
@PreAuthorize("hasPermission('Get',{#context,'SelectSOrg',this.getEntity()})")
@ApiOperation(value = "fetch查询下级单位", tags = {"IBZOrganization" } ,notes = "fetch查询下级单位")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchselectsorg")
public ResponseEntity<List<IBZOrganizationDTO>> fetchSelectSOrg(IBZOrganizationSearchContext context) {
......@@ -174,7 +174,7 @@ public class IBZOrganizationResource {
.body(list);
}
@PreAuthorize("hasPermission('READ',{#context,'SelectSOrg',this.getEntity()})")
@PreAuthorize("hasPermission('Get',{#context,'SelectSOrg',this.getEntity()})")
@ApiOperation(value = "search查询下级单位", tags = {"IBZOrganization" } ,notes = "search查询下级单位")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/searchselectsorg")
public ResponseEntity<Page<IBZOrganizationDTO>> searchSelectSOrg(IBZOrganizationSearchContext context) {
......@@ -183,7 +183,7 @@ public class IBZOrganizationResource {
.body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasPermission('READ',{#context,'SelectPOrg',this.getEntity()})")
@PreAuthorize("hasPermission('Get',{#context,'SelectPOrg',this.getEntity()})")
@ApiOperation(value = "fetch查询上级单位", tags = {"IBZOrganization" } ,notes = "fetch查询上级单位")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchselectporg")
public ResponseEntity<List<IBZOrganizationDTO>> fetchSelectPOrg(IBZOrganizationSearchContext context) {
......@@ -196,7 +196,7 @@ public class IBZOrganizationResource {
.body(list);
}
@PreAuthorize("hasPermission('READ',{#context,'SelectPOrg',this.getEntity()})")
@PreAuthorize("hasPermission('Get',{#context,'SelectPOrg',this.getEntity()})")
@ApiOperation(value = "search查询上级单位", tags = {"IBZOrganization" } ,notes = "search查询上级单位")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/searchselectporg")
public ResponseEntity<Page<IBZOrganizationDTO>> searchSelectPOrg(IBZOrganizationSearchContext context) {
......@@ -205,7 +205,7 @@ public class IBZOrganizationResource {
.body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasPermission('READ',{#context,'Default',this.getEntity()})")
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity()})")
@ApiOperation(value = "fetchDEFAULT", tags = {"IBZOrganization" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchdefault")
public ResponseEntity<List<IBZOrganizationDTO>> fetchDefault(IBZOrganizationSearchContext context) {
......@@ -218,7 +218,7 @@ public class IBZOrganizationResource {
.body(list);
}
@PreAuthorize("hasPermission('READ',{#context,'Default',this.getEntity()})")
@PreAuthorize("hasPermission('Get',{#context,'Default',this.getEntity()})")
@ApiOperation(value = "searchDEFAULT", tags = {"IBZOrganization" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/searchdefault")
public ResponseEntity<Page<IBZOrganizationDTO>> searchDefault(IBZOrganizationSearchContext context) {
......
server:
port: 8081
\ No newline at end of file
port: 40001
\ No newline at end of file
......@@ -69,7 +69,7 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
return false;
List gridParamList = (ArrayList) gridParam;
if(action.equals("DELETE")){ //grid delete
if(action.equalsIgnoreCase("DELETE")){ //grid delete
//准备参数
Object srfKey =gridParamList.get(0);
EntityBase entity = (EntityBase) gridParamList.get(1);
......@@ -145,7 +145,7 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
JSONObject permissionList=userPermission.getJSONObject("userPermissionList");
String entityName = entity.getClass().getSimpleName();
if(action.equals("CREATE")){
if(action.equalsIgnoreCase("CREATE")){
return validDEActionHasPermission(permissionList,entityName,action);
}
else{
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册