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

lab_qyk 部署微服务接口

上级 2c098b86
......@@ -37,6 +37,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 ibzlab-rt --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
......@@ -150,7 +150,7 @@
<verbose>true</verbose>
<logging>debug</logging>
<contexts>!test</contexts>
<diffExcludeObjects>Index:.*,table:ibzfile,ibzuser,ibzdataaudit</diffExcludeObjects>
<diffExcludeObjects>Index:.*,table:ibzfile,ibzuser,ibzdataaudit,IBZFILE,IBZUSER,IBZDATAAUDIT</diffExcludeObjects>
</configuration>
<phase>process-resources</phase>
<goals>
......
......@@ -2,7 +2,7 @@
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
<!--输出实体[IBZORG]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzorg-424-1">
<changeSet author="a_A_5d9d78509" id="tab-ibzorg-429-1">
<createTable tableName="IBZORG">
<column name="ORGID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZORG_ORGID"/>
......@@ -28,7 +28,7 @@
</createTable>
</changeSet>
<!--输出实体[IBZEMP]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzemp-618-2">
<changeSet author="a_A_5d9d78509" id="tab-ibzemp-623-2">
<createTable tableName="IBZEMP">
<column name="USERID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZEMP_USERID"/>
......@@ -118,7 +118,7 @@
</createTable>
</changeSet>
<!--输出实体[IBZDEPT]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzdept-543-4">
<changeSet author="a_A_5d9d78509" id="tab-ibzdept-554-4">
<createTable tableName="IBZDEPT">
<column name="DEPTID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZDEPT_DEPTID"/>
......@@ -153,14 +153,14 @@
</changeSet>
<!--输出实体[IBZORG]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzorg-424-5">
<changeSet author="a_A_5d9d78509" id="fk-ibzorg-429-5">
<addForeignKeyConstraint baseColumnNames="PORGID" baseTableName="IBZORG" constraintName="DER1N_IBZORG_IBZORG_PORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet>
<!--输出实体[IBZEMP]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzemp-618-6">
<changeSet author="a_A_5d9d78509" id="fk-ibzemp-623-6">
<addForeignKeyConstraint baseColumnNames="MDEPTID" baseTableName="IBZEMP" constraintName="DER1N_IBZEMP_IBZDEPT_MDEPTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/>
</changeSet>
<changeSet author="a_A_5d9d78509" id="fk-ibzemp-618-7">
<changeSet author="a_A_5d9d78509" id="fk-ibzemp-623-7">
<addForeignKeyConstraint baseColumnNames="ORGID" baseTableName="IBZEMP" constraintName="DER1N_IBZEMP_IBZORG_ORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet>
<!--输出实体[IBZDEPTMEMBER]外键关系 -->
......@@ -171,10 +171,10 @@
<addForeignKeyConstraint baseColumnNames="USERID" baseTableName="IBZDEPTMEMBER" constraintName="DER1N_IBZDEPTMEMBER_IBZEMP_USE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="USERID" referencedTableName="IBZEMP" validate="true"/>
</changeSet>
<!--输出实体[IBZDEPT]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzdept-543-10">
<changeSet author="a_A_5d9d78509" id="fk-ibzdept-554-10">
<addForeignKeyConstraint baseColumnNames="PDEPTID" baseTableName="IBZDEPT" constraintName="DER1N_IBZDEPT_IBZDEPT_PDEPTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/>
</changeSet>
<changeSet author="a_A_5d9d78509" id="fk-ibzdept-543-11">
<changeSet author="a_A_5d9d78509" id="fk-ibzdept-554-11">
<addForeignKeyConstraint baseColumnNames="ORGID" baseTableName="IBZDEPT" constraintName="DER1N_IBZDEPT_IBZORG_ORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet>
......
......@@ -40,7 +40,7 @@
{
"appid":"web",
"appname":"统一组织单位",
"appmenu":[{"menuid":"OUIndexView", "menuname":"OUIndexView", "menuitem":[{ "id":"menuitem1" , "name":"单位管理" },{ "id":"menuitem2" , "name":"部门管理" },{ "id":"menuitem3" , "name":"人员管理" }] }]
"appmenu":[{"menuid":"OUIndexView", "menuname":"OUIndexView", "menuitem":[{ "id":"menuitem1" , "name":"单位管理" },{ "id":"menuitem2" , "name":"部门管理" },{ "id":"menuitem3" , "name":"人员管理" },{ "id":"menuitem4" , "name":"组织树" },{ "id":"menuitem5" , "name":"部门树" }] }]
}
]
}
......@@ -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,21 @@ 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
- SERVER_PORT=40001
- 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:
mode: replicated
replicas: 1
......
......@@ -54,19 +54,13 @@ public class IBZOrganizationResource {
public IBZOrganizationDTO permissionDTO=new IBZOrganizationDTO();
//@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-CheckKey-all')")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-CheckKey-all')")
@ApiOperation(value = "CheckKey", tags = {"IBZOrganization" }, notes = "CheckKey")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody IBZOrganizationDTO ibzorganizationdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationService.checkKey(ibzorganizationMapping.toDomain(ibzorganizationdto)));
}
@PreAuthorize("hasPermission(#ibzorganization_id,'Update',{'Sql',this.ibzorganizationMapping,#ibzorganizationdto})")
@ApiOperation(value = "Update", tags = {"IBZOrganization" }, notes = "Update")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}")
......@@ -79,6 +73,7 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission('Update',{'Sql',this.humanMapping,#humandtos})")
@ApiOperation(value = "UpdateBatch", tags = {"IBZOrganization" }, notes = "UpdateBatch")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) {
......@@ -86,9 +81,6 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission('','Create',{'Sql',this.ibzorganizationMapping,#ibzorganizationdto})")
@ApiOperation(value = "Create", tags = {"IBZOrganization" }, notes = "Create")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations")
......@@ -100,6 +92,7 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission('Create',{'Sql',this.humanMapping,#humandtos})")
@ApiOperation(value = "createBatch", tags = {"IBZOrganization" }, notes = "createBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) {
......@@ -107,16 +100,14 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
//@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-Save-all')")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-Save-all')")
@ApiOperation(value = "Save", tags = {"IBZOrganization" }, notes = "Save")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/save")
public ResponseEntity<Boolean> save(@RequestBody IBZOrganizationDTO ibzorganizationdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationService.save(ibzorganizationMapping.toDomain(ibzorganizationdto)));
}
@PreAuthorize("hasPermission('Save',{'Sql',this.humanMapping,#humandtos})")
@ApiOperation(value = "SaveBatch", tags = {"IBZOrganization" }, notes = "SaveBatch")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) {
......@@ -124,9 +115,6 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(#ibzorganization_id,'Remove',{'Sql',this.ibzorganizationMapping,this.permissionDTO})")
@ApiOperation(value = "Remove", tags = {"IBZOrganization" }, notes = "Remove")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}")
......@@ -135,6 +123,7 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationService.remove(ibzorganization_id));
}
@PreAuthorize("hasPermission('Remove',{'Sql',this.humanMapping,this.permissionDTO,#ids})")
@ApiOperation(value = "RemoveBatch", tags = {"IBZOrganization" }, notes = "RemoveBatch")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
......@@ -142,9 +131,6 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(#ibzorganization_id,'Get',{'Sql',this.ibzorganizationMapping,this.permissionDTO})")
@ApiOperation(value = "Get", tags = {"IBZOrganization" }, notes = "Get")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}")
......@@ -154,17 +140,14 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
//@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-GetDraft-all')")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-GetDraft-all')")
@ApiOperation(value = "GetDraft", tags = {"IBZOrganization" }, notes = "GetDraft")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/getdraft")
public ResponseEntity<IBZOrganizationDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationMapping.toDto(ibzorganizationService.getDraft(new IBZOrganization())));
}
//@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectSOrg-all')")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectSOrg-all')")
@ApiOperation(value = "fetch查询下级单位", tags = {"IBZOrganization" } ,notes = "fetch查询下级单位")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchselectsorg")
public ResponseEntity<List<IBZOrganizationDTO>> fetchSelectSOrg(IBZOrganizationSearchContext context) {
......@@ -177,7 +160,7 @@ public class IBZOrganizationResource {
.body(list);
}
//@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectSOrg-all')")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectSOrg-all')")
@ApiOperation(value = "search查询下级单位", tags = {"IBZOrganization" } ,notes = "search查询下级单位")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/searchselectsorg")
public ResponseEntity<Page<IBZOrganizationDTO>> searchSelectSOrg(@RequestBody IBZOrganizationSearchContext context) {
......@@ -185,8 +168,7 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
//@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectPOrg-all')")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectPOrg-all')")
@ApiOperation(value = "fetch查询上级单位", tags = {"IBZOrganization" } ,notes = "fetch查询上级单位")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchselectporg")
public ResponseEntity<List<IBZOrganizationDTO>> fetchSelectPOrg(IBZOrganizationSearchContext context) {
......@@ -199,7 +181,7 @@ public class IBZOrganizationResource {
.body(list);
}
//@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectPOrg-all')")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectPOrg-all')")
@ApiOperation(value = "search查询上级单位", tags = {"IBZOrganization" } ,notes = "search查询上级单位")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/searchselectporg")
public ResponseEntity<Page<IBZOrganizationDTO>> searchSelectPOrg(@RequestBody IBZOrganizationSearchContext context) {
......@@ -207,8 +189,7 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
//@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-Default-all')")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"IBZOrganization" } ,notes = "fetchDEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchdefault")
public ResponseEntity<List<IBZOrganizationDTO>> fetchDefault(IBZOrganizationSearchContext context) {
......@@ -221,7 +202,7 @@ public class IBZOrganizationResource {
.body(list);
}
//@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-Default-all')")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"IBZOrganization" } ,notes = "searchDEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/searchdefault")
public ResponseEntity<Page<IBZOrganizationDTO>> searchDefault(@RequestBody IBZOrganizationSearchContext context) {
......@@ -229,8 +210,4 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册