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

lab_gzf 部署微服务接口

上级 3e152198
......@@ -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 /assetmanagement-app-assetmanagement.jar
EXPOSE 10325
EXPOSE 8080
ADD assetmanagement-app-assetmanagement.jar /assetmanagement-app-assetmanagement.jar
......@@ -3,23 +3,9 @@ services:
assetmanagement-app-assetmanagement:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/assetmanagement-app-assetmanagement:latest
ports:
- "10325:10325"
- "8080:8080"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10325
- 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_e85d8801c
- SPRING_DATASOURCE_PASSWORD=b1@@@772
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
deploy:
resources:
limits:
......
......@@ -27,25 +27,5 @@ zuul:
path: /eamlocationstatemodellines/**
serviceId: ${ibiz.ref.service.ibizassetmanagement-assetapi:ibizassetmanagement-assetapi}
stripPrefix: false
loginv7:
path: /v7/login
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
changepwd:
path: /v7/changepwd
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
uaa:
path: /uaa/**
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
config:
path: /config/**
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
oucore:
path: /ibzorganizations/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
sensitive-headers:
- Cookie,Set-Cookie,Authorization
server:
port: 8080
#zuul网关路由设置
zuul:
routes:
loginv7:
path: /v7/login
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
changepwd:
path: /v7/changepwd
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
uaa:
path: /uaa/**
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
config:
path: /config/**
serviceId: ${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix: false
oucore:
path: /ibzorganizations/**
serviceId: ${ibiz.ref.service.ou:ibzou-api}
stripPrefix: false
sensitive-headers:
- Cookie,Set-Cookie,Authorization
......@@ -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 /assetmanagement-provider-assetapi.jar
EXPOSE 8081
EXPOSE 10315
ADD assetmanagement-provider-assetapi.jar /assetmanagement-provider-assetapi.jar
......@@ -3,9 +3,23 @@ services:
assetmanagement-provider-assetapi:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/assetmanagement-provider-assetapi:latest
ports:
- "8081:8081"
- "10315:10315"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=10315
- 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_e85d8801c
- SPRING_DATASOURCE_PASSWORD=b1@@@772
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_e85d8801c?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_e85d8801c
- CAS=https://passport.ibizlab.cn
- NACOS=172.16.240.110:8848
deploy:
resources:
limits:
......
......@@ -47,5 +47,118 @@ public class EAMLocationResource {
@Lazy
public EAMLocationMapping eamlocationMapping;
@PreAuthorize("hasPermission(this.eamlocationMapping.toDomain(#eamlocationdto),'iBizAssetManagement-EAMLocation-Create')")
@ApiOperation(value = "新建功能位置", tags = {"功能位置" }, notes = "新建功能位置")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocations")
@Transactional
public ResponseEntity<EAMLocationDTO> create(@RequestBody EAMLocationDTO eamlocationdto) {
EAMLocation domain = eamlocationMapping.toDomain(eamlocationdto);
eamlocationService.create(domain);
EAMLocationDTO dto = eamlocationMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.eamlocationMapping.toDomain(#eamlocationdtos),'iBizAssetManagement-EAMLocation-Create')")
@ApiOperation(value = "批量新建功能位置", tags = {"功能位置" }, notes = "批量新建功能位置")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocations/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<EAMLocationDTO> eamlocationdtos) {
eamlocationService.createBatch(eamlocationMapping.toDomain(eamlocationdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@VersionCheck(entity = "eamlocation" , versionfield = "updatedate")
@PreAuthorize("hasPermission(this.eamlocationService.get(#eamlocation_id),'iBizAssetManagement-EAMLocation-Update')")
@ApiOperation(value = "更新功能位置", tags = {"功能位置" }, notes = "更新功能位置")
@RequestMapping(method = RequestMethod.PUT, value = "/eamlocations/{eamlocation_id}")
@Transactional
public ResponseEntity<EAMLocationDTO> update(@PathVariable("eamlocation_id") String eamlocation_id, @RequestBody EAMLocationDTO eamlocationdto) {
EAMLocation domain = eamlocationMapping.toDomain(eamlocationdto);
domain .setEamlocationid(eamlocation_id);
eamlocationService.update(domain );
EAMLocationDTO dto = eamlocationMapping.toDto(domain );
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.eamlocationService.getEamlocationByEntities(this.eamlocationMapping.toDomain(#eamlocationdtos)),'iBizAssetManagement-EAMLocation-Update')")
@ApiOperation(value = "批量更新功能位置", tags = {"功能位置" }, notes = "批量更新功能位置")
@RequestMapping(method = RequestMethod.PUT, value = "/eamlocations/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<EAMLocationDTO> eamlocationdtos) {
eamlocationService.updateBatch(eamlocationMapping.toDomain(eamlocationdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.eamlocationService.get(#eamlocation_id),'iBizAssetManagement-EAMLocation-Remove')")
@ApiOperation(value = "删除功能位置", tags = {"功能位置" }, notes = "删除功能位置")
@RequestMapping(method = RequestMethod.DELETE, value = "/eamlocations/{eamlocation_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("eamlocation_id") String eamlocation_id) {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationService.remove(eamlocation_id));
}
@PreAuthorize("hasPermission(this.eamlocationService.getEamlocationByIds(#ids),'iBizAssetManagement-EAMLocation-Remove')")
@ApiOperation(value = "批量删除功能位置", tags = {"功能位置" }, notes = "批量删除功能位置")
@RequestMapping(method = RequestMethod.DELETE, value = "/eamlocations/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
eamlocationService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PostAuthorize("hasPermission(this.eamlocationMapping.toDomain(returnObject.body),'iBizAssetManagement-EAMLocation-Get')")
@ApiOperation(value = "获取功能位置", tags = {"功能位置" }, notes = "获取功能位置")
@RequestMapping(method = RequestMethod.GET, value = "/eamlocations/{eamlocation_id}")
public ResponseEntity<EAMLocationDTO> get(@PathVariable("eamlocation_id") String eamlocation_id) {
EAMLocation domain = eamlocationService.get(eamlocation_id);
EAMLocationDTO dto = eamlocationMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取功能位置草稿", tags = {"功能位置" }, notes = "获取功能位置草稿")
@RequestMapping(method = RequestMethod.GET, value = "/eamlocations/getdraft")
public ResponseEntity<EAMLocationDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationMapping.toDto(eamlocationService.getDraft(new EAMLocation())));
}
@ApiOperation(value = "检查功能位置", tags = {"功能位置" }, notes = "检查功能位置")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocations/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody EAMLocationDTO eamlocationdto) {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationService.checkKey(eamlocationMapping.toDomain(eamlocationdto)));
}
@PreAuthorize("hasPermission(this.eamlocationMapping.toDomain(#eamlocationdto),'iBizAssetManagement-EAMLocation-Save')")
@ApiOperation(value = "保存功能位置", tags = {"功能位置" }, notes = "保存功能位置")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocations/save")
public ResponseEntity<Boolean> save(@RequestBody EAMLocationDTO eamlocationdto) {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationService.save(eamlocationMapping.toDomain(eamlocationdto)));
}
@PreAuthorize("hasPermission(this.eamlocationMapping.toDomain(#eamlocationdtos),'iBizAssetManagement-EAMLocation-Save')")
@ApiOperation(value = "批量保存功能位置", tags = {"功能位置" }, notes = "批量保存功能位置")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocations/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<EAMLocationDTO> eamlocationdtos) {
eamlocationService.saveBatch(eamlocationMapping.toDomain(eamlocationdtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizAssetManagement-EAMLocation-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMLocation-Get')")
@ApiOperation(value = "获取DEFAULT", tags = {"功能位置" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/eamlocations/fetchdefault")
public ResponseEntity<List<EAMLocationDTO>> fetchDefault(EAMLocationSearchContext context) {
Page<EAMLocation> domains = eamlocationService.searchDefault(context) ;
List<EAMLocationDTO> list = eamlocationMapping.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','iBizAssetManagement-EAMLocation-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMLocation-Get')")
@ApiOperation(value = "查询DEFAULT", tags = {"功能位置" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/eamlocations/searchdefault")
public ResponseEntity<Page<EAMLocationDTO>> searchDefault(@RequestBody EAMLocationSearchContext context) {
Page<EAMLocation> domains = eamlocationService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(eamlocationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
......@@ -47,5 +47,118 @@ public class EAMLocationStateModelLineResource {
@Lazy
public EAMLocationStateModelLineMapping eamlocationstatemodellineMapping;
@PreAuthorize("hasPermission(this.eamlocationstatemodellineMapping.toDomain(#eamlocationstatemodellinedto),'iBizAssetManagement-EAMLocationStateModelLine-Create')")
@ApiOperation(value = "新建功能位置状态模型明细", tags = {"功能位置状态模型明细" }, notes = "新建功能位置状态模型明细")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationstatemodellines")
@Transactional
public ResponseEntity<EAMLocationStateModelLineDTO> create(@RequestBody EAMLocationStateModelLineDTO eamlocationstatemodellinedto) {
EAMLocationStateModelLine domain = eamlocationstatemodellineMapping.toDomain(eamlocationstatemodellinedto);
eamlocationstatemodellineService.create(domain);
EAMLocationStateModelLineDTO dto = eamlocationstatemodellineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.eamlocationstatemodellineMapping.toDomain(#eamlocationstatemodellinedtos),'iBizAssetManagement-EAMLocationStateModelLine-Create')")
@ApiOperation(value = "批量新建功能位置状态模型明细", tags = {"功能位置状态模型明细" }, notes = "批量新建功能位置状态模型明细")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationstatemodellines/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<EAMLocationStateModelLineDTO> eamlocationstatemodellinedtos) {
eamlocationstatemodellineService.createBatch(eamlocationstatemodellineMapping.toDomain(eamlocationstatemodellinedtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@VersionCheck(entity = "eamlocationstatemodelline" , versionfield = "updatedate")
@PreAuthorize("hasPermission(this.eamlocationstatemodellineService.get(#eamlocationstatemodelline_id),'iBizAssetManagement-EAMLocationStateModelLine-Update')")
@ApiOperation(value = "更新功能位置状态模型明细", tags = {"功能位置状态模型明细" }, notes = "更新功能位置状态模型明细")
@RequestMapping(method = RequestMethod.PUT, value = "/eamlocationstatemodellines/{eamlocationstatemodelline_id}")
@Transactional
public ResponseEntity<EAMLocationStateModelLineDTO> update(@PathVariable("eamlocationstatemodelline_id") String eamlocationstatemodelline_id, @RequestBody EAMLocationStateModelLineDTO eamlocationstatemodellinedto) {
EAMLocationStateModelLine domain = eamlocationstatemodellineMapping.toDomain(eamlocationstatemodellinedto);
domain .setEamlocationstatemodellineid(eamlocationstatemodelline_id);
eamlocationstatemodellineService.update(domain );
EAMLocationStateModelLineDTO dto = eamlocationstatemodellineMapping.toDto(domain );
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.eamlocationstatemodellineService.getEamlocationstatemodellineByEntities(this.eamlocationstatemodellineMapping.toDomain(#eamlocationstatemodellinedtos)),'iBizAssetManagement-EAMLocationStateModelLine-Update')")
@ApiOperation(value = "批量更新功能位置状态模型明细", tags = {"功能位置状态模型明细" }, notes = "批量更新功能位置状态模型明细")
@RequestMapping(method = RequestMethod.PUT, value = "/eamlocationstatemodellines/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<EAMLocationStateModelLineDTO> eamlocationstatemodellinedtos) {
eamlocationstatemodellineService.updateBatch(eamlocationstatemodellineMapping.toDomain(eamlocationstatemodellinedtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.eamlocationstatemodellineService.get(#eamlocationstatemodelline_id),'iBizAssetManagement-EAMLocationStateModelLine-Remove')")
@ApiOperation(value = "删除功能位置状态模型明细", tags = {"功能位置状态模型明细" }, notes = "删除功能位置状态模型明细")
@RequestMapping(method = RequestMethod.DELETE, value = "/eamlocationstatemodellines/{eamlocationstatemodelline_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("eamlocationstatemodelline_id") String eamlocationstatemodelline_id) {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationstatemodellineService.remove(eamlocationstatemodelline_id));
}
@PreAuthorize("hasPermission(this.eamlocationstatemodellineService.getEamlocationstatemodellineByIds(#ids),'iBizAssetManagement-EAMLocationStateModelLine-Remove')")
@ApiOperation(value = "批量删除功能位置状态模型明细", tags = {"功能位置状态模型明细" }, notes = "批量删除功能位置状态模型明细")
@RequestMapping(method = RequestMethod.DELETE, value = "/eamlocationstatemodellines/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
eamlocationstatemodellineService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PostAuthorize("hasPermission(this.eamlocationstatemodellineMapping.toDomain(returnObject.body),'iBizAssetManagement-EAMLocationStateModelLine-Get')")
@ApiOperation(value = "获取功能位置状态模型明细", tags = {"功能位置状态模型明细" }, notes = "获取功能位置状态模型明细")
@RequestMapping(method = RequestMethod.GET, value = "/eamlocationstatemodellines/{eamlocationstatemodelline_id}")
public ResponseEntity<EAMLocationStateModelLineDTO> get(@PathVariable("eamlocationstatemodelline_id") String eamlocationstatemodelline_id) {
EAMLocationStateModelLine domain = eamlocationstatemodellineService.get(eamlocationstatemodelline_id);
EAMLocationStateModelLineDTO dto = eamlocationstatemodellineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取功能位置状态模型明细草稿", tags = {"功能位置状态模型明细" }, notes = "获取功能位置状态模型明细草稿")
@RequestMapping(method = RequestMethod.GET, value = "/eamlocationstatemodellines/getdraft")
public ResponseEntity<EAMLocationStateModelLineDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationstatemodellineMapping.toDto(eamlocationstatemodellineService.getDraft(new EAMLocationStateModelLine())));
}
@ApiOperation(value = "检查功能位置状态模型明细", tags = {"功能位置状态模型明细" }, notes = "检查功能位置状态模型明细")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationstatemodellines/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody EAMLocationStateModelLineDTO eamlocationstatemodellinedto) {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationstatemodellineService.checkKey(eamlocationstatemodellineMapping.toDomain(eamlocationstatemodellinedto)));
}
@PreAuthorize("hasPermission(this.eamlocationstatemodellineMapping.toDomain(#eamlocationstatemodellinedto),'iBizAssetManagement-EAMLocationStateModelLine-Save')")
@ApiOperation(value = "保存功能位置状态模型明细", tags = {"功能位置状态模型明细" }, notes = "保存功能位置状态模型明细")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationstatemodellines/save")
public ResponseEntity<Boolean> save(@RequestBody EAMLocationStateModelLineDTO eamlocationstatemodellinedto) {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationstatemodellineService.save(eamlocationstatemodellineMapping.toDomain(eamlocationstatemodellinedto)));
}
@PreAuthorize("hasPermission(this.eamlocationstatemodellineMapping.toDomain(#eamlocationstatemodellinedtos),'iBizAssetManagement-EAMLocationStateModelLine-Save')")
@ApiOperation(value = "批量保存功能位置状态模型明细", tags = {"功能位置状态模型明细" }, notes = "批量保存功能位置状态模型明细")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationstatemodellines/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<EAMLocationStateModelLineDTO> eamlocationstatemodellinedtos) {
eamlocationstatemodellineService.saveBatch(eamlocationstatemodellineMapping.toDomain(eamlocationstatemodellinedtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizAssetManagement-EAMLocationStateModelLine-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMLocationStateModelLine-Get')")
@ApiOperation(value = "获取DEFAULT", tags = {"功能位置状态模型明细" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/eamlocationstatemodellines/fetchdefault")
public ResponseEntity<List<EAMLocationStateModelLineDTO>> fetchDefault(EAMLocationStateModelLineSearchContext context) {
Page<EAMLocationStateModelLine> domains = eamlocationstatemodellineService.searchDefault(context) ;
List<EAMLocationStateModelLineDTO> list = eamlocationstatemodellineMapping.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','iBizAssetManagement-EAMLocationStateModelLine-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMLocationStateModelLine-Get')")
@ApiOperation(value = "查询DEFAULT", tags = {"功能位置状态模型明细" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/eamlocationstatemodellines/searchdefault")
public ResponseEntity<Page<EAMLocationStateModelLineDTO>> searchDefault(@RequestBody EAMLocationStateModelLineSearchContext context) {
Page<EAMLocationStateModelLine> domains = eamlocationstatemodellineService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(eamlocationstatemodellineMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
......@@ -47,5 +47,118 @@ public class EAMLocationStateModelResource {
@Lazy
public EAMLocationStateModelMapping eamlocationstatemodelMapping;
@PreAuthorize("hasPermission(this.eamlocationstatemodelMapping.toDomain(#eamlocationstatemodeldto),'iBizAssetManagement-EAMLocationStateModel-Create')")
@ApiOperation(value = "新建功能位置状态模型", tags = {"功能位置状态模型" }, notes = "新建功能位置状态模型")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationstatemodels")
@Transactional
public ResponseEntity<EAMLocationStateModelDTO> create(@RequestBody EAMLocationStateModelDTO eamlocationstatemodeldto) {
EAMLocationStateModel domain = eamlocationstatemodelMapping.toDomain(eamlocationstatemodeldto);
eamlocationstatemodelService.create(domain);
EAMLocationStateModelDTO dto = eamlocationstatemodelMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.eamlocationstatemodelMapping.toDomain(#eamlocationstatemodeldtos),'iBizAssetManagement-EAMLocationStateModel-Create')")
@ApiOperation(value = "批量新建功能位置状态模型", tags = {"功能位置状态模型" }, notes = "批量新建功能位置状态模型")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationstatemodels/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<EAMLocationStateModelDTO> eamlocationstatemodeldtos) {
eamlocationstatemodelService.createBatch(eamlocationstatemodelMapping.toDomain(eamlocationstatemodeldtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@VersionCheck(entity = "eamlocationstatemodel" , versionfield = "updatedate")
@PreAuthorize("hasPermission(this.eamlocationstatemodelService.get(#eamlocationstatemodel_id),'iBizAssetManagement-EAMLocationStateModel-Update')")
@ApiOperation(value = "更新功能位置状态模型", tags = {"功能位置状态模型" }, notes = "更新功能位置状态模型")
@RequestMapping(method = RequestMethod.PUT, value = "/eamlocationstatemodels/{eamlocationstatemodel_id}")
@Transactional
public ResponseEntity<EAMLocationStateModelDTO> update(@PathVariable("eamlocationstatemodel_id") String eamlocationstatemodel_id, @RequestBody EAMLocationStateModelDTO eamlocationstatemodeldto) {
EAMLocationStateModel domain = eamlocationstatemodelMapping.toDomain(eamlocationstatemodeldto);
domain .setEamlocationstatemodelid(eamlocationstatemodel_id);
eamlocationstatemodelService.update(domain );
EAMLocationStateModelDTO dto = eamlocationstatemodelMapping.toDto(domain );
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.eamlocationstatemodelService.getEamlocationstatemodelByEntities(this.eamlocationstatemodelMapping.toDomain(#eamlocationstatemodeldtos)),'iBizAssetManagement-EAMLocationStateModel-Update')")
@ApiOperation(value = "批量更新功能位置状态模型", tags = {"功能位置状态模型" }, notes = "批量更新功能位置状态模型")
@RequestMapping(method = RequestMethod.PUT, value = "/eamlocationstatemodels/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<EAMLocationStateModelDTO> eamlocationstatemodeldtos) {
eamlocationstatemodelService.updateBatch(eamlocationstatemodelMapping.toDomain(eamlocationstatemodeldtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.eamlocationstatemodelService.get(#eamlocationstatemodel_id),'iBizAssetManagement-EAMLocationStateModel-Remove')")
@ApiOperation(value = "删除功能位置状态模型", tags = {"功能位置状态模型" }, notes = "删除功能位置状态模型")
@RequestMapping(method = RequestMethod.DELETE, value = "/eamlocationstatemodels/{eamlocationstatemodel_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("eamlocationstatemodel_id") String eamlocationstatemodel_id) {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationstatemodelService.remove(eamlocationstatemodel_id));
}
@PreAuthorize("hasPermission(this.eamlocationstatemodelService.getEamlocationstatemodelByIds(#ids),'iBizAssetManagement-EAMLocationStateModel-Remove')")
@ApiOperation(value = "批量删除功能位置状态模型", tags = {"功能位置状态模型" }, notes = "批量删除功能位置状态模型")
@RequestMapping(method = RequestMethod.DELETE, value = "/eamlocationstatemodels/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
eamlocationstatemodelService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PostAuthorize("hasPermission(this.eamlocationstatemodelMapping.toDomain(returnObject.body),'iBizAssetManagement-EAMLocationStateModel-Get')")
@ApiOperation(value = "获取功能位置状态模型", tags = {"功能位置状态模型" }, notes = "获取功能位置状态模型")
@RequestMapping(method = RequestMethod.GET, value = "/eamlocationstatemodels/{eamlocationstatemodel_id}")
public ResponseEntity<EAMLocationStateModelDTO> get(@PathVariable("eamlocationstatemodel_id") String eamlocationstatemodel_id) {
EAMLocationStateModel domain = eamlocationstatemodelService.get(eamlocationstatemodel_id);
EAMLocationStateModelDTO dto = eamlocationstatemodelMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取功能位置状态模型草稿", tags = {"功能位置状态模型" }, notes = "获取功能位置状态模型草稿")
@RequestMapping(method = RequestMethod.GET, value = "/eamlocationstatemodels/getdraft")
public ResponseEntity<EAMLocationStateModelDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationstatemodelMapping.toDto(eamlocationstatemodelService.getDraft(new EAMLocationStateModel())));
}
@ApiOperation(value = "检查功能位置状态模型", tags = {"功能位置状态模型" }, notes = "检查功能位置状态模型")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationstatemodels/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody EAMLocationStateModelDTO eamlocationstatemodeldto) {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationstatemodelService.checkKey(eamlocationstatemodelMapping.toDomain(eamlocationstatemodeldto)));
}
@PreAuthorize("hasPermission(this.eamlocationstatemodelMapping.toDomain(#eamlocationstatemodeldto),'iBizAssetManagement-EAMLocationStateModel-Save')")
@ApiOperation(value = "保存功能位置状态模型", tags = {"功能位置状态模型" }, notes = "保存功能位置状态模型")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationstatemodels/save")
public ResponseEntity<Boolean> save(@RequestBody EAMLocationStateModelDTO eamlocationstatemodeldto) {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationstatemodelService.save(eamlocationstatemodelMapping.toDomain(eamlocationstatemodeldto)));
}
@PreAuthorize("hasPermission(this.eamlocationstatemodelMapping.toDomain(#eamlocationstatemodeldtos),'iBizAssetManagement-EAMLocationStateModel-Save')")
@ApiOperation(value = "批量保存功能位置状态模型", tags = {"功能位置状态模型" }, notes = "批量保存功能位置状态模型")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationstatemodels/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<EAMLocationStateModelDTO> eamlocationstatemodeldtos) {
eamlocationstatemodelService.saveBatch(eamlocationstatemodelMapping.toDomain(eamlocationstatemodeldtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizAssetManagement-EAMLocationStateModel-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMLocationStateModel-Get')")
@ApiOperation(value = "获取DEFAULT", tags = {"功能位置状态模型" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/eamlocationstatemodels/fetchdefault")
public ResponseEntity<List<EAMLocationStateModelDTO>> fetchDefault(EAMLocationStateModelSearchContext context) {
Page<EAMLocationStateModel> domains = eamlocationstatemodelService.searchDefault(context) ;
List<EAMLocationStateModelDTO> list = eamlocationstatemodelMapping.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','iBizAssetManagement-EAMLocationStateModel-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMLocationStateModel-Get')")
@ApiOperation(value = "查询DEFAULT", tags = {"功能位置状态模型" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/eamlocationstatemodels/searchdefault")
public ResponseEntity<Page<EAMLocationStateModelDTO>> searchDefault(@RequestBody EAMLocationStateModelSearchContext context) {
Page<EAMLocationStateModel> domains = eamlocationstatemodelService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(eamlocationstatemodelMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
......@@ -47,5 +47,118 @@ public class EAMLocationStateResource {
@Lazy
public EAMLocationStateMapping eamlocationstateMapping;
@PreAuthorize("hasPermission(this.eamlocationstateMapping.toDomain(#eamlocationstatedto),'iBizAssetManagement-EAMLocationState-Create')")
@ApiOperation(value = "新建功能位置状态", tags = {"功能位置状态" }, notes = "新建功能位置状态")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationstates")
@Transactional
public ResponseEntity<EAMLocationStateDTO> create(@RequestBody EAMLocationStateDTO eamlocationstatedto) {
EAMLocationState domain = eamlocationstateMapping.toDomain(eamlocationstatedto);
eamlocationstateService.create(domain);
EAMLocationStateDTO dto = eamlocationstateMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.eamlocationstateMapping.toDomain(#eamlocationstatedtos),'iBizAssetManagement-EAMLocationState-Create')")
@ApiOperation(value = "批量新建功能位置状态", tags = {"功能位置状态" }, notes = "批量新建功能位置状态")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationstates/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<EAMLocationStateDTO> eamlocationstatedtos) {
eamlocationstateService.createBatch(eamlocationstateMapping.toDomain(eamlocationstatedtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@VersionCheck(entity = "eamlocationstate" , versionfield = "updatedate")
@PreAuthorize("hasPermission(this.eamlocationstateService.get(#eamlocationstate_id),'iBizAssetManagement-EAMLocationState-Update')")
@ApiOperation(value = "更新功能位置状态", tags = {"功能位置状态" }, notes = "更新功能位置状态")
@RequestMapping(method = RequestMethod.PUT, value = "/eamlocationstates/{eamlocationstate_id}")
@Transactional
public ResponseEntity<EAMLocationStateDTO> update(@PathVariable("eamlocationstate_id") String eamlocationstate_id, @RequestBody EAMLocationStateDTO eamlocationstatedto) {
EAMLocationState domain = eamlocationstateMapping.toDomain(eamlocationstatedto);
domain .setEamlocationstateid(eamlocationstate_id);
eamlocationstateService.update(domain );
EAMLocationStateDTO dto = eamlocationstateMapping.toDto(domain );
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.eamlocationstateService.getEamlocationstateByEntities(this.eamlocationstateMapping.toDomain(#eamlocationstatedtos)),'iBizAssetManagement-EAMLocationState-Update')")
@ApiOperation(value = "批量更新功能位置状态", tags = {"功能位置状态" }, notes = "批量更新功能位置状态")
@RequestMapping(method = RequestMethod.PUT, value = "/eamlocationstates/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<EAMLocationStateDTO> eamlocationstatedtos) {
eamlocationstateService.updateBatch(eamlocationstateMapping.toDomain(eamlocationstatedtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.eamlocationstateService.get(#eamlocationstate_id),'iBizAssetManagement-EAMLocationState-Remove')")
@ApiOperation(value = "删除功能位置状态", tags = {"功能位置状态" }, notes = "删除功能位置状态")
@RequestMapping(method = RequestMethod.DELETE, value = "/eamlocationstates/{eamlocationstate_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("eamlocationstate_id") String eamlocationstate_id) {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationstateService.remove(eamlocationstate_id));
}
@PreAuthorize("hasPermission(this.eamlocationstateService.getEamlocationstateByIds(#ids),'iBizAssetManagement-EAMLocationState-Remove')")
@ApiOperation(value = "批量删除功能位置状态", tags = {"功能位置状态" }, notes = "批量删除功能位置状态")
@RequestMapping(method = RequestMethod.DELETE, value = "/eamlocationstates/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
eamlocationstateService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PostAuthorize("hasPermission(this.eamlocationstateMapping.toDomain(returnObject.body),'iBizAssetManagement-EAMLocationState-Get')")
@ApiOperation(value = "获取功能位置状态", tags = {"功能位置状态" }, notes = "获取功能位置状态")
@RequestMapping(method = RequestMethod.GET, value = "/eamlocationstates/{eamlocationstate_id}")
public ResponseEntity<EAMLocationStateDTO> get(@PathVariable("eamlocationstate_id") String eamlocationstate_id) {
EAMLocationState domain = eamlocationstateService.get(eamlocationstate_id);
EAMLocationStateDTO dto = eamlocationstateMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取功能位置状态草稿", tags = {"功能位置状态" }, notes = "获取功能位置状态草稿")
@RequestMapping(method = RequestMethod.GET, value = "/eamlocationstates/getdraft")
public ResponseEntity<EAMLocationStateDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationstateMapping.toDto(eamlocationstateService.getDraft(new EAMLocationState())));
}
@ApiOperation(value = "检查功能位置状态", tags = {"功能位置状态" }, notes = "检查功能位置状态")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationstates/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody EAMLocationStateDTO eamlocationstatedto) {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationstateService.checkKey(eamlocationstateMapping.toDomain(eamlocationstatedto)));
}
@PreAuthorize("hasPermission(this.eamlocationstateMapping.toDomain(#eamlocationstatedto),'iBizAssetManagement-EAMLocationState-Save')")
@ApiOperation(value = "保存功能位置状态", tags = {"功能位置状态" }, notes = "保存功能位置状态")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationstates/save")
public ResponseEntity<Boolean> save(@RequestBody EAMLocationStateDTO eamlocationstatedto) {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationstateService.save(eamlocationstateMapping.toDomain(eamlocationstatedto)));
}
@PreAuthorize("hasPermission(this.eamlocationstateMapping.toDomain(#eamlocationstatedtos),'iBizAssetManagement-EAMLocationState-Save')")
@ApiOperation(value = "批量保存功能位置状态", tags = {"功能位置状态" }, notes = "批量保存功能位置状态")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationstates/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<EAMLocationStateDTO> eamlocationstatedtos) {
eamlocationstateService.saveBatch(eamlocationstateMapping.toDomain(eamlocationstatedtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizAssetManagement-EAMLocationState-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMLocationState-Get')")
@ApiOperation(value = "获取DEFAULT", tags = {"功能位置状态" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/eamlocationstates/fetchdefault")
public ResponseEntity<List<EAMLocationStateDTO>> fetchDefault(EAMLocationStateSearchContext context) {
Page<EAMLocationState> domains = eamlocationstateService.searchDefault(context) ;
List<EAMLocationStateDTO> list = eamlocationstateMapping.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','iBizAssetManagement-EAMLocationState-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMLocationState-Get')")
@ApiOperation(value = "查询DEFAULT", tags = {"功能位置状态" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/eamlocationstates/searchdefault")
public ResponseEntity<Page<EAMLocationStateDTO>> searchDefault(@RequestBody EAMLocationStateSearchContext context) {
Page<EAMLocationState> domains = eamlocationstateService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(eamlocationstateMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
......@@ -47,5 +47,118 @@ public class EAMLocationTypeResource {
@Lazy
public EAMLocationTypeMapping eamlocationtypeMapping;
@PreAuthorize("hasPermission(this.eamlocationtypeMapping.toDomain(#eamlocationtypedto),'iBizAssetManagement-EAMLocationType-Create')")
@ApiOperation(value = "新建功能位置类型", tags = {"功能位置类型" }, notes = "新建功能位置类型")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationtypes")
@Transactional
public ResponseEntity<EAMLocationTypeDTO> create(@RequestBody EAMLocationTypeDTO eamlocationtypedto) {
EAMLocationType domain = eamlocationtypeMapping.toDomain(eamlocationtypedto);
eamlocationtypeService.create(domain);
EAMLocationTypeDTO dto = eamlocationtypeMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.eamlocationtypeMapping.toDomain(#eamlocationtypedtos),'iBizAssetManagement-EAMLocationType-Create')")
@ApiOperation(value = "批量新建功能位置类型", tags = {"功能位置类型" }, notes = "批量新建功能位置类型")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationtypes/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<EAMLocationTypeDTO> eamlocationtypedtos) {
eamlocationtypeService.createBatch(eamlocationtypeMapping.toDomain(eamlocationtypedtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@VersionCheck(entity = "eamlocationtype" , versionfield = "updatedate")
@PreAuthorize("hasPermission(this.eamlocationtypeService.get(#eamlocationtype_id),'iBizAssetManagement-EAMLocationType-Update')")
@ApiOperation(value = "更新功能位置类型", tags = {"功能位置类型" }, notes = "更新功能位置类型")
@RequestMapping(method = RequestMethod.PUT, value = "/eamlocationtypes/{eamlocationtype_id}")
@Transactional
public ResponseEntity<EAMLocationTypeDTO> update(@PathVariable("eamlocationtype_id") String eamlocationtype_id, @RequestBody EAMLocationTypeDTO eamlocationtypedto) {
EAMLocationType domain = eamlocationtypeMapping.toDomain(eamlocationtypedto);
domain .setEamlocationtypeid(eamlocationtype_id);
eamlocationtypeService.update(domain );
EAMLocationTypeDTO dto = eamlocationtypeMapping.toDto(domain );
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.eamlocationtypeService.getEamlocationtypeByEntities(this.eamlocationtypeMapping.toDomain(#eamlocationtypedtos)),'iBizAssetManagement-EAMLocationType-Update')")
@ApiOperation(value = "批量更新功能位置类型", tags = {"功能位置类型" }, notes = "批量更新功能位置类型")
@RequestMapping(method = RequestMethod.PUT, value = "/eamlocationtypes/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<EAMLocationTypeDTO> eamlocationtypedtos) {
eamlocationtypeService.updateBatch(eamlocationtypeMapping.toDomain(eamlocationtypedtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasPermission(this.eamlocationtypeService.get(#eamlocationtype_id),'iBizAssetManagement-EAMLocationType-Remove')")
@ApiOperation(value = "删除功能位置类型", tags = {"功能位置类型" }, notes = "删除功能位置类型")
@RequestMapping(method = RequestMethod.DELETE, value = "/eamlocationtypes/{eamlocationtype_id}")
@Transactional
public ResponseEntity<Boolean> remove(@PathVariable("eamlocationtype_id") String eamlocationtype_id) {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationtypeService.remove(eamlocationtype_id));
}
@PreAuthorize("hasPermission(this.eamlocationtypeService.getEamlocationtypeByIds(#ids),'iBizAssetManagement-EAMLocationType-Remove')")
@ApiOperation(value = "批量删除功能位置类型", tags = {"功能位置类型" }, notes = "批量删除功能位置类型")
@RequestMapping(method = RequestMethod.DELETE, value = "/eamlocationtypes/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
eamlocationtypeService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PostAuthorize("hasPermission(this.eamlocationtypeMapping.toDomain(returnObject.body),'iBizAssetManagement-EAMLocationType-Get')")
@ApiOperation(value = "获取功能位置类型", tags = {"功能位置类型" }, notes = "获取功能位置类型")
@RequestMapping(method = RequestMethod.GET, value = "/eamlocationtypes/{eamlocationtype_id}")
public ResponseEntity<EAMLocationTypeDTO> get(@PathVariable("eamlocationtype_id") String eamlocationtype_id) {
EAMLocationType domain = eamlocationtypeService.get(eamlocationtype_id);
EAMLocationTypeDTO dto = eamlocationtypeMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取功能位置类型草稿", tags = {"功能位置类型" }, notes = "获取功能位置类型草稿")
@RequestMapping(method = RequestMethod.GET, value = "/eamlocationtypes/getdraft")
public ResponseEntity<EAMLocationTypeDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationtypeMapping.toDto(eamlocationtypeService.getDraft(new EAMLocationType())));
}
@ApiOperation(value = "检查功能位置类型", tags = {"功能位置类型" }, notes = "检查功能位置类型")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationtypes/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody EAMLocationTypeDTO eamlocationtypedto) {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationtypeService.checkKey(eamlocationtypeMapping.toDomain(eamlocationtypedto)));
}
@PreAuthorize("hasPermission(this.eamlocationtypeMapping.toDomain(#eamlocationtypedto),'iBizAssetManagement-EAMLocationType-Save')")
@ApiOperation(value = "保存功能位置类型", tags = {"功能位置类型" }, notes = "保存功能位置类型")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationtypes/save")
public ResponseEntity<Boolean> save(@RequestBody EAMLocationTypeDTO eamlocationtypedto) {
return ResponseEntity.status(HttpStatus.OK).body(eamlocationtypeService.save(eamlocationtypeMapping.toDomain(eamlocationtypedto)));
}
@PreAuthorize("hasPermission(this.eamlocationtypeMapping.toDomain(#eamlocationtypedtos),'iBizAssetManagement-EAMLocationType-Save')")
@ApiOperation(value = "批量保存功能位置类型", tags = {"功能位置类型" }, notes = "批量保存功能位置类型")
@RequestMapping(method = RequestMethod.POST, value = "/eamlocationtypes/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<EAMLocationTypeDTO> eamlocationtypedtos) {
eamlocationtypeService.saveBatch(eamlocationtypeMapping.toDomain(eamlocationtypedtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizAssetManagement-EAMLocationType-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMLocationType-Get')")
@ApiOperation(value = "获取DEFAULT", tags = {"功能位置类型" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/eamlocationtypes/fetchdefault")
public ResponseEntity<List<EAMLocationTypeDTO>> fetchDefault(EAMLocationTypeSearchContext context) {
Page<EAMLocationType> domains = eamlocationtypeService.searchDefault(context) ;
List<EAMLocationTypeDTO> list = eamlocationtypeMapping.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','iBizAssetManagement-EAMLocationType-searchDefault-all') and hasPermission(#context,'iBizAssetManagement-EAMLocationType-Get')")
@ApiOperation(value = "查询DEFAULT", tags = {"功能位置类型" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/eamlocationtypes/searchdefault")
public ResponseEntity<Page<EAMLocationTypeDTO>> searchDefault(@RequestBody EAMLocationTypeSearchContext context) {
Page<EAMLocationType> domains = eamlocationtypeService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(eamlocationtypeMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
......@@ -19,7 +19,7 @@ import java.util.Optional;
import java.util.function.Function;
@Component
@ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.token.util:UAATokenUtil}'.equals('SimpleTokenUtil')")
@ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.token.util:SimpleTokenUtil}'.equals('SimpleTokenUtil')")
public class SimpleTokenUtil implements AuthTokenUtil,Serializable {
private static final long serialVersionUID = -3301605591108950415L;
......
......@@ -30,7 +30,7 @@ import java.util.Map;
import java.util.function.Function;
@Component
@ConditionalOnExpression("${ibiz.enablePermissionValid:false}||'${ibiz.auth.token.util:UAATokenUtil}'.equals('UAATokenUtil')")
@ConditionalOnExpression("${ibiz.enablePermissionValid:false}||'${ibiz.auth.token.util:SimpleTokenUtil}'.equals('UAATokenUtil')")
public class UAATokenUtil implements AuthTokenUtil, Serializable {
private static final long serialVersionUID = -3301605591108950415L;
......
......@@ -15,12 +15,12 @@ public interface AuthenticationUserService extends UserDetailsService {
@Override
@Cacheable( value="ibzuaa_users",key = "'getByUsername:'+#p0")
@Cacheable( value="assetmanagement_users",key = "'getByUsername:'+#p0")
AuthenticationUser loadUserByUsername(String username);
@Cacheable( value="ibzuaa_users",key = "'getByUsername:'+#p0")
@Cacheable( value="assetmanagement_users",key = "'getByUsername:'+#p0")
AuthenticationUser loadUserByLogin(String username,String password);
@CacheEvict( value="ibzuaa_users",key = "'getByUsername:'+#p0")
@CacheEvict( value="assetmanagement_users",key = "'getByUsername:'+#p0")
void resetByUsername(String username);
}
......@@ -26,7 +26,7 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
@Value("${ibiz.admin.userid:0100}")
private String adminuserid;
@Cacheable( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
@Cacheable( value="assetmanagement_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public JSONObject getConfig(String cfgType,String targetType,String userId)
{
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType))
......@@ -41,7 +41,7 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
return JSON.parseObject(config.getCfg());
}
@CacheEvict( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
@CacheEvict( value="assetmanagement_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public boolean saveConfig(String cfgType,String targetType,String userId,JSONObject config)
{
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType))
......@@ -52,7 +52,7 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
return this.saveOrUpdate(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).cfg(cfg).updateDate(DataObject.getNow()).build());
}
@CacheEvict( value="ibzrt_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
@CacheEvict( value="assetmanagement_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public void resetConfig(String cfgType,String targetType,String userId)
{
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType))
......
......@@ -18,7 +18,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
* 实体[IBZUSER] 服务对象接口实现
*/
@Service("IBZUAAUserService")
@ConditionalOnExpression("${ibiz.enablePermissionValid:false}||'${ibiz.auth.service:IBZUAAUserService}'.equals('IBZUAAUserService')")
@ConditionalOnExpression("${ibiz.enablePermissionValid:false}||'${ibiz.auth.service:SimpleUserService}'.equals('IBZUAAUserService')")
public class IBZUAAUserService implements AuthenticationUserService{
@Autowired
......
......@@ -20,7 +20,7 @@ import org.springframework.security.core.authority.AuthorityUtils;
* 实体[IBZUSER] 服务对象接口实现
*/
@Service("IBZUSERService")
@ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.service:IBZUAAUserService}'.equals('IBZUSERService')")
@ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.service:SimpleUserService}'.equals('IBZUSERService')")
public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> implements IBZUSERService,AuthenticationUserService{
@Value("${ibiz.auth.pwencrymode:0}")
......
......@@ -18,7 +18,7 @@ import org.springframework.security.core.authority.AuthorityUtils;
*/
@Primary
@Service("SimpleUserService")
@ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.service:IBZUAAUserService}'.equals('SimpleUserService')")
@ConditionalOnExpression("(!${ibiz.enablePermissionValid:false})&&'${ibiz.auth.service:SimpleUserService}'.equals('SimpleUserService')")
public class SimpleUserService implements AuthenticationUserService{
@Override
......
......@@ -85,7 +85,7 @@ ribbon:
#系统是否开启权限验证、是否开启缓存
#缓存级别:无缓存(无配置项)、一级缓存(L1)、二级缓存(L2)
ibiz:
enablePermissionValid: true
enablePermissionValid: false
cacheLevel: L1 #(L1)一级本地caffeine缓存;(L2)caffeine缓存+Redis缓存
### jobs
......
......@@ -37,11 +37,11 @@
git clone -b master $para2 ibizassetmanagement/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibizassetmanagement/
mvn clean package -Passetmanagement
cd assetmanagement-app/assetmanagement-app-assetmanagement
mvn -Passetmanagement docker:build
mvn -Passetmanagement docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/assetmanagement-app-assetmanagement.yaml iBizEE --with-registry-auth
mvn clean package -Passetapi
cd assetmanagement-provider/assetmanagement-provider-assetapi
mvn -Passetapi docker:build
mvn -Passetapi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/assetmanagement-provider-assetapi.yaml iBizEE --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册