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

tony001 部署微服务接口 [后台服务,接口示例]

上级 c5c1346d
......@@ -37,6 +37,11 @@
git clone -b master $para2 demosys/
export NODE_OPTIONS=--max-old-space-size=4096
cd demosys/
mvn clean package -Pdemoapi
cd demo-provider/demo-provider-demoapi
mvn -Pdemoapi docker:build
mvn -Pdemoapi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/demo-provider-demoapi.yaml iBizDemo --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
......
......@@ -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 /demo-provider-demoapi.jar
EXPOSE 8081
EXPOSE 51000
ADD demo-provider-demoapi.jar /demo-provider-demoapi.jar
......@@ -3,9 +3,24 @@ services:
demo-provider-demoapi:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/demo-provider-demoapi:latest
ports:
- "8081:8081"
- "51000:51000"
networks:
- agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
- SERVER_PORT=51000
- 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_df847bdfd
- SPRING_DATASOURCE_PASSWORD=3d6@460A
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_df847bdfd?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_df847bdfd
- NACOS=172.16.240.110:8848
- SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
- SEATA_ENABLED=true
deploy:
resources:
limits:
......
......@@ -356,5 +356,335 @@ public class IBIZOrderDetailResource {
}
@PreAuthorize("hasPermission(this.ibizorderdetailMapping.toDomain(#ibizorderdetaildto),'DemoSys-IBIZOrderDetail-Create')")
@ApiOperation(value = "根据订单建立订单明细", tags = {"订单明细" }, notes = "根据订单建立订单明细")
@RequestMapping(method = RequestMethod.POST, value = "/ibizorders/{ibizorder_id}/ibizorderdetails")
public ResponseEntity<IBIZOrderDetailDTO> createByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody IBIZOrderDetailDTO ibizorderdetaildto) {
IBIZOrderDetail domain = ibizorderdetailMapping.toDomain(ibizorderdetaildto);
domain.setIbizorderid(ibizorder_id);
ibizorderdetailService.create(domain);
IBIZOrderDetailDTO dto = ibizorderdetailMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.ibizorderdetailMapping.toDomain(#ibizorderdetaildtos),'DemoSys-IBIZOrderDetail-Create')")
@ApiOperation(value = "根据订单批量建立订单明细", tags = {"订单明细" }, notes = "根据订单批量建立订单明细")
@RequestMapping(method = RequestMethod.POST, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/batch")
public ResponseEntity<Boolean> createBatchByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody List<IBIZOrderDetailDTO> ibizorderdetaildtos) {
List<IBIZOrderDetail> domainlist=ibizorderdetailMapping.toDomain(ibizorderdetaildtos);
for(IBIZOrderDetail domain:domainlist){
domain.setIbizorderid(ibizorder_id);
}
ibizorderdetailService.createBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrderDetail-CreateTemp-all')")
@ApiOperation(value = "根据订单订单明细", tags = {"订单明细" }, notes = "根据订单订单明细")
@RequestMapping(method = RequestMethod.POST, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/{ibizorderdetail_id}/createtemp")
public ResponseEntity<IBIZOrderDetailDTO> createTempByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @PathVariable("ibizorderdetail_id") String ibizorderdetail_id, @RequestBody IBIZOrderDetailDTO ibizorderdetaildto) {
IBIZOrderDetail domain = ibizorderdetailMapping.toDomain(ibizorderdetaildto);
domain.setIbizorderid(ibizorder_id);
domain = ibizorderdetailService.createTemp(domain) ;
ibizorderdetaildto = ibizorderdetailMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ibizorderdetaildto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrderDetail-CreateTempMajor-all')")
@ApiOperation(value = "根据订单订单明细", tags = {"订单明细" }, notes = "根据订单订单明细")
@RequestMapping(method = RequestMethod.POST, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/{ibizorderdetail_id}/createtempmajor")
public ResponseEntity<IBIZOrderDetailDTO> createTempMajorByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @PathVariable("ibizorderdetail_id") String ibizorderdetail_id, @RequestBody IBIZOrderDetailDTO ibizorderdetaildto) {
IBIZOrderDetail domain = ibizorderdetailMapping.toDomain(ibizorderdetaildto);
domain.setIbizorderid(ibizorder_id);
domain = ibizorderdetailService.createTempMajor(domain) ;
ibizorderdetaildto = ibizorderdetailMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ibizorderdetaildto);
}
@VersionCheck(entity = "ibizorderdetail" , versionfield = "updatedate")
@PreAuthorize("hasPermission(this.ibizorderdetailService.get(#ibizorderdetail_id),'DemoSys-IBIZOrderDetail-Update')")
@ApiOperation(value = "根据订单更新订单明细", tags = {"订单明细" }, notes = "根据订单更新订单明细")
@RequestMapping(method = RequestMethod.PUT, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/{ibizorderdetail_id}")
public ResponseEntity<IBIZOrderDetailDTO> updateByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @PathVariable("ibizorderdetail_id") String ibizorderdetail_id, @RequestBody IBIZOrderDetailDTO ibizorderdetaildto) {
IBIZOrderDetail domain = ibizorderdetailMapping.toDomain(ibizorderdetaildto);
domain.setIbizorderid(ibizorder_id);
domain.setIbizorderdetailid(ibizorderdetail_id);
ibizorderdetailService.update(domain);
IBIZOrderDetailDTO dto = ibizorderdetailMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasPermission(this.ibizorderdetailService.getIbizorderdetailByEntities(this.ibizorderdetailMapping.toDomain(#ibizorderdetaildtos)),'DemoSys-IBIZOrderDetail-Update')")
@ApiOperation(value = "根据订单批量更新订单明细", tags = {"订单明细" }, notes = "根据订单批量更新订单明细")
@RequestMapping(method = RequestMethod.PUT, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/batch")
public ResponseEntity<Boolean> updateBatchByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody List<IBIZOrderDetailDTO> ibizorderdetaildtos) {
List<IBIZOrderDetail> domainlist=ibizorderdetailMapping.toDomain(ibizorderdetaildtos);
for(IBIZOrderDetail domain:domainlist){
domain.setIbizorderid(ibizorder_id);
}
ibizorderdetailService.updateBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrderDetail-UpdateTemp-all')")
@ApiOperation(value = "根据订单订单明细", tags = {"订单明细" }, notes = "根据订单订单明细")
@RequestMapping(method = RequestMethod.PUT, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/{ibizorderdetail_id}/updatetemp")
public ResponseEntity<IBIZOrderDetailDTO> updateTempByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @PathVariable("ibizorderdetail_id") String ibizorderdetail_id, @RequestBody IBIZOrderDetailDTO ibizorderdetaildto) {
IBIZOrderDetail domain = ibizorderdetailMapping.toDomain(ibizorderdetaildto);
domain.setIbizorderid(ibizorder_id);
domain = ibizorderdetailService.updateTemp(domain) ;
ibizorderdetaildto = ibizorderdetailMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ibizorderdetaildto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrderDetail-UpdateTempMajor-all')")
@ApiOperation(value = "根据订单订单明细", tags = {"订单明细" }, notes = "根据订单订单明细")
@RequestMapping(method = RequestMethod.PUT, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/{ibizorderdetail_id}/updatetempmajor")
public ResponseEntity<IBIZOrderDetailDTO> updateTempMajorByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @PathVariable("ibizorderdetail_id") String ibizorderdetail_id, @RequestBody IBIZOrderDetailDTO ibizorderdetaildto) {
IBIZOrderDetail domain = ibizorderdetailMapping.toDomain(ibizorderdetaildto);
domain.setIbizorderid(ibizorder_id);
domain = ibizorderdetailService.updateTempMajor(domain) ;
ibizorderdetaildto = ibizorderdetailMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ibizorderdetaildto);
}
@PreAuthorize("hasPermission(this.ibizorderdetailService.get(#ibizorderdetail_id),'DemoSys-IBIZOrderDetail-Remove')")
@ApiOperation(value = "根据订单删除订单明细", tags = {"订单明细" }, notes = "根据订单删除订单明细")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/{ibizorderdetail_id}")
public ResponseEntity<Boolean> removeByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @PathVariable("ibizorderdetail_id") String ibizorderdetail_id) {
return ResponseEntity.status(HttpStatus.OK).body(ibizorderdetailService.remove(ibizorderdetail_id));
}
@PreAuthorize("hasPermission(this.ibizorderdetailService.getIbizorderdetailByIds(#ids),'DemoSys-IBIZOrderDetail-Remove')")
@ApiOperation(value = "根据订单批量删除订单明细", tags = {"订单明细" }, notes = "根据订单批量删除订单明细")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/batch")
public ResponseEntity<Boolean> removeBatchByIBIZOrder(@RequestBody List<String> ids) {
ibizorderdetailService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrderDetail-RemoveTemp-all')")
@ApiOperation(value = "根据订单订单明细", tags = {"订单明细" }, notes = "根据订单订单明细")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/{ibizorderdetail_id}/removetemp")
public ResponseEntity<IBIZOrderDetailDTO> removeTempByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @PathVariable("ibizorderdetail_id") String ibizorderdetail_id, @RequestBody IBIZOrderDetailDTO ibizorderdetaildto) {
IBIZOrderDetail domain = ibizorderdetailMapping.toDomain(ibizorderdetaildto);
domain.setIbizorderid(ibizorder_id);
domain = ibizorderdetailService.removeTemp(domain) ;
ibizorderdetaildto = ibizorderdetailMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ibizorderdetaildto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrderDetail-RemoveTempMajor-all')")
@ApiOperation(value = "根据订单订单明细", tags = {"订单明细" }, notes = "根据订单订单明细")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/{ibizorderdetail_id}/removetempmajor")
public ResponseEntity<IBIZOrderDetailDTO> removeTempMajorByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @PathVariable("ibizorderdetail_id") String ibizorderdetail_id, @RequestBody IBIZOrderDetailDTO ibizorderdetaildto) {
IBIZOrderDetail domain = ibizorderdetailMapping.toDomain(ibizorderdetaildto);
domain.setIbizorderid(ibizorder_id);
domain = ibizorderdetailService.removeTempMajor(domain) ;
ibizorderdetaildto = ibizorderdetailMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ibizorderdetaildto);
}
@PostAuthorize("hasPermission(this.ibizorderdetailMapping.toDomain(returnObject.body),'DemoSys-IBIZOrderDetail-Get')")
@ApiOperation(value = "根据订单获取订单明细", tags = {"订单明细" }, notes = "根据订单获取订单明细")
@RequestMapping(method = RequestMethod.GET, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/{ibizorderdetail_id}")
public ResponseEntity<IBIZOrderDetailDTO> getByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @PathVariable("ibizorderdetail_id") String ibizorderdetail_id) {
IBIZOrderDetail domain = ibizorderdetailService.get(ibizorderdetail_id);
IBIZOrderDetailDTO dto = ibizorderdetailMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrderDetail-GetTemp-all')")
@ApiOperation(value = "根据订单订单明细", tags = {"订单明细" }, notes = "根据订单订单明细")
@RequestMapping(method = RequestMethod.GET, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/{ibizorderdetail_id}/gettemp")
public ResponseEntity<IBIZOrderDetailDTO> getTempByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @PathVariable("ibizorderdetail_id") String ibizorderdetail_id, @RequestBody IBIZOrderDetailDTO ibizorderdetaildto) {
IBIZOrderDetail domain = ibizorderdetailMapping.toDomain(ibizorderdetaildto);
domain.setIbizorderid(ibizorder_id);
domain = ibizorderdetailService.getTemp(domain) ;
ibizorderdetaildto = ibizorderdetailMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ibizorderdetaildto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrderDetail-GetTempMajor-all')")
@ApiOperation(value = "根据订单订单明细", tags = {"订单明细" }, notes = "根据订单订单明细")
@RequestMapping(method = RequestMethod.GET, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/{ibizorderdetail_id}/gettempmajor")
public ResponseEntity<IBIZOrderDetailDTO> getTempMajorByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @PathVariable("ibizorderdetail_id") String ibizorderdetail_id, @RequestBody IBIZOrderDetailDTO ibizorderdetaildto) {
IBIZOrderDetail domain = ibizorderdetailMapping.toDomain(ibizorderdetaildto);
domain.setIbizorderid(ibizorder_id);
domain = ibizorderdetailService.getTempMajor(domain) ;
ibizorderdetaildto = ibizorderdetailMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ibizorderdetaildto);
}
@ApiOperation(value = "根据订单获取订单明细草稿", tags = {"订单明细" }, notes = "根据订单获取订单明细草稿")
@RequestMapping(method = RequestMethod.GET, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/getdraft")
public ResponseEntity<IBIZOrderDetailDTO> getDraftByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id) {
IBIZOrderDetail domain = new IBIZOrderDetail();
domain.setIbizorderid(ibizorder_id);
return ResponseEntity.status(HttpStatus.OK).body(ibizorderdetailMapping.toDto(ibizorderdetailService.getDraft(domain)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrderDetail-GetDraftTemp-all')")
@ApiOperation(value = "根据订单订单明细", tags = {"订单明细" }, notes = "根据订单订单明细")
@RequestMapping(method = RequestMethod.GET, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/getdrafttemp")
public ResponseEntity<IBIZOrderDetailDTO> getDraftTempByIBIZOrder() {
IBIZOrderDetail domain =new IBIZOrderDetail();
domain = ibizorderdetailService.getDraftTemp(domain) ;
IBIZOrderDetailDTO ibizorderdetaildto = ibizorderdetailMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ibizorderdetaildto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrderDetail-GetDraftTempMajor-all')")
@ApiOperation(value = "根据订单订单明细", tags = {"订单明细" }, notes = "根据订单订单明细")
@RequestMapping(method = RequestMethod.GET, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/{ibizorderdetail_id}/getdrafttempmajor")
public ResponseEntity<IBIZOrderDetailDTO> getDraftTempMajorByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @PathVariable("ibizorderdetail_id") String ibizorderdetail_id, @RequestBody IBIZOrderDetailDTO ibizorderdetaildto) {
IBIZOrderDetail domain = ibizorderdetailMapping.toDomain(ibizorderdetaildto);
domain.setIbizorderid(ibizorder_id);
domain = ibizorderdetailService.getDraftTempMajor(domain) ;
ibizorderdetaildto = ibizorderdetailMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ibizorderdetaildto);
}
@ApiOperation(value = "根据订单检查订单明细", tags = {"订单明细" }, notes = "根据订单检查订单明细")
@RequestMapping(method = RequestMethod.POST, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/checkkey")
public ResponseEntity<Boolean> checkKeyByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody IBIZOrderDetailDTO ibizorderdetaildto) {
return ResponseEntity.status(HttpStatus.OK).body(ibizorderdetailService.checkKey(ibizorderdetailMapping.toDomain(ibizorderdetaildto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrderDetail-CountMoney-all')")
@ApiOperation(value = "根据订单订单明细", tags = {"订单明细" }, notes = "根据订单订单明细")
@RequestMapping(method = RequestMethod.POST, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/{ibizorderdetail_id}/countmoney")
public ResponseEntity<IBIZOrderDetailDTO> countMoneyByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @PathVariable("ibizorderdetail_id") String ibizorderdetail_id, @RequestBody IBIZOrderDetailDTO ibizorderdetaildto) {
IBIZOrderDetail domain = ibizorderdetailMapping.toDomain(ibizorderdetaildto);
domain.setIbizorderid(ibizorder_id);
domain = ibizorderdetailService.countMoney(domain) ;
ibizorderdetaildto = ibizorderdetailMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ibizorderdetaildto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrderDetail-GetUnitAndPrice-all')")
@ApiOperation(value = "根据订单订单明细", tags = {"订单明细" }, notes = "根据订单订单明细")
@RequestMapping(method = RequestMethod.GET, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/{ibizorderdetail_id}/getunitandprice")
public ResponseEntity<IBIZOrderDetailDTO> getUnitAndPriceByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @PathVariable("ibizorderdetail_id") String ibizorderdetail_id, @RequestBody IBIZOrderDetailDTO ibizorderdetaildto) {
IBIZOrderDetail domain = ibizorderdetailMapping.toDomain(ibizorderdetaildto);
domain.setIbizorderid(ibizorder_id);
domain = ibizorderdetailService.getUnitAndPrice(domain) ;
ibizorderdetaildto = ibizorderdetailMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(ibizorderdetaildto);
}
@PreAuthorize("hasPermission(this.ibizorderdetailMapping.toDomain(#ibizorderdetaildto),'DemoSys-IBIZOrderDetail-Save')")
@ApiOperation(value = "根据订单保存订单明细", tags = {"订单明细" }, notes = "根据订单保存订单明细")
@RequestMapping(method = RequestMethod.POST, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/save")
public ResponseEntity<Boolean> saveByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody IBIZOrderDetailDTO ibizorderdetaildto) {
IBIZOrderDetail domain = ibizorderdetailMapping.toDomain(ibizorderdetaildto);
domain.setIbizorderid(ibizorder_id);
return ResponseEntity.status(HttpStatus.OK).body(ibizorderdetailService.save(domain));
}
@PreAuthorize("hasPermission(this.ibizorderdetailMapping.toDomain(#ibizorderdetaildtos),'DemoSys-IBIZOrderDetail-Save')")
@ApiOperation(value = "根据订单批量保存订单明细", tags = {"订单明细" }, notes = "根据订单批量保存订单明细")
@RequestMapping(method = RequestMethod.POST, value = "/ibizorders/{ibizorder_id}/ibizorderdetails/savebatch")
public ResponseEntity<Boolean> saveBatchByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody List<IBIZOrderDetailDTO> ibizorderdetaildtos) {
List<IBIZOrderDetail> domainlist=ibizorderdetailMapping.toDomain(ibizorderdetaildtos);
for(IBIZOrderDetail domain:domainlist){
domain.setIbizorderid(ibizorder_id);
}
ibizorderdetailService.saveBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrderDetail-searchCSMXDY-all') and hasPermission(#context,'DemoSys-IBIZOrderDetail-Get')")
@ApiOperation(value = "根据订单获取测试明细打印", tags = {"订单明细" } ,notes = "根据订单获取测试明细打印")
@RequestMapping(method= RequestMethod.GET , value="/ibizorders/{ibizorder_id}/ibizorderdetails/fetchcsmxdy")
public ResponseEntity<List<IBIZOrderDetailDTO>> fetchIBIZOrderDetailCSMXDYByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id,IBIZOrderDetailSearchContext context) {
context.setN_ibizorderid_eq(ibizorder_id);
Page<IBIZOrderDetail> domains = ibizorderdetailService.searchCSMXDY(context) ;
List<IBIZOrderDetailDTO> list = ibizorderdetailMapping.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','DemoSys-IBIZOrderDetail-searchCSMXDY-all') and hasPermission(#context,'DemoSys-IBIZOrderDetail-Get')")
@ApiOperation(value = "根据订单查询测试明细打印", tags = {"订单明细" } ,notes = "根据订单查询测试明细打印")
@RequestMapping(method= RequestMethod.POST , value="/ibizorders/{ibizorder_id}/ibizorderdetails/searchcsmxdy")
public ResponseEntity<Page<IBIZOrderDetailDTO>> searchIBIZOrderDetailCSMXDYByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody IBIZOrderDetailSearchContext context) {
context.setN_ibizorderid_eq(ibizorder_id);
Page<IBIZOrderDetail> domains = ibizorderdetailService.searchCSMXDY(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(ibizorderdetailMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrderDetail-searchDefault-all') and hasPermission(#context,'DemoSys-IBIZOrderDetail-Get')")
@ApiOperation(value = "根据订单获取DEFAULT", tags = {"订单明细" } ,notes = "根据订单获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibizorders/{ibizorder_id}/ibizorderdetails/fetchdefault")
public ResponseEntity<List<IBIZOrderDetailDTO>> fetchIBIZOrderDetailDefaultByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id,IBIZOrderDetailSearchContext context) {
context.setN_ibizorderid_eq(ibizorder_id);
Page<IBIZOrderDetail> domains = ibizorderdetailService.searchDefault(context) ;
List<IBIZOrderDetailDTO> list = ibizorderdetailMapping.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','DemoSys-IBIZOrderDetail-searchDefault-all') and hasPermission(#context,'DemoSys-IBIZOrderDetail-Get')")
@ApiOperation(value = "根据订单查询DEFAULT", tags = {"订单明细" } ,notes = "根据订单查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibizorders/{ibizorder_id}/ibizorderdetails/searchdefault")
public ResponseEntity<Page<IBIZOrderDetailDTO>> searchIBIZOrderDetailDefaultByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody IBIZOrderDetailSearchContext context) {
context.setN_ibizorderid_eq(ibizorder_id);
Page<IBIZOrderDetail> domains = ibizorderdetailService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(ibizorderdetailMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrderDetail-searchLOGIC_0007-all') and hasPermission(#context,'DemoSys-IBIZOrderDetail-Get')")
@ApiOperation(value = "根据订单获取查询订单明细中产品数量", tags = {"订单明细" } ,notes = "根据订单获取查询订单明细中产品数量")
@RequestMapping(method= RequestMethod.GET , value="/ibizorders/{ibizorder_id}/ibizorderdetails/fetchlogic_0007")
public ResponseEntity<List<IBIZOrderDetailDTO>> fetchIBIZOrderDetailLOGIC_0007ByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id,IBIZOrderDetailSearchContext context) {
context.setN_ibizorderid_eq(ibizorder_id);
Page<IBIZOrderDetail> domains = ibizorderdetailService.searchLOGIC_0007(context) ;
List<IBIZOrderDetailDTO> list = ibizorderdetailMapping.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','DemoSys-IBIZOrderDetail-searchLOGIC_0007-all') and hasPermission(#context,'DemoSys-IBIZOrderDetail-Get')")
@ApiOperation(value = "根据订单查询查询订单明细中产品数量", tags = {"订单明细" } ,notes = "根据订单查询查询订单明细中产品数量")
@RequestMapping(method= RequestMethod.POST , value="/ibizorders/{ibizorder_id}/ibizorderdetails/searchlogic_0007")
public ResponseEntity<Page<IBIZOrderDetailDTO>> searchIBIZOrderDetailLOGIC_0007ByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody IBIZOrderDetailSearchContext context) {
context.setN_ibizorderid_eq(ibizorder_id);
Page<IBIZOrderDetail> domains = ibizorderdetailService.searchLOGIC_0007(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(ibizorderdetailMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrderDetail-searchX-all') and hasPermission(#context,'DemoSys-IBIZOrderDetail-Get')")
@ApiOperation(value = "根据订单获取x", tags = {"订单明细" } ,notes = "根据订单获取x")
@RequestMapping(method= RequestMethod.GET , value="/ibizorders/{ibizorder_id}/ibizorderdetails/fetchx")
public ResponseEntity<List<IBIZOrderDetailDTO>> fetchIBIZOrderDetailXByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id,IBIZOrderDetailSearchContext context) {
context.setN_ibizorderid_eq(ibizorder_id);
Page<IBIZOrderDetail> domains = ibizorderdetailService.searchX(context) ;
List<IBIZOrderDetailDTO> list = ibizorderdetailMapping.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','DemoSys-IBIZOrderDetail-searchX-all') and hasPermission(#context,'DemoSys-IBIZOrderDetail-Get')")
@ApiOperation(value = "根据订单查询x", tags = {"订单明细" } ,notes = "根据订单查询x")
@RequestMapping(method= RequestMethod.POST , value="/ibizorders/{ibizorder_id}/ibizorderdetails/searchx")
public ResponseEntity<Page<IBIZOrderDetailDTO>> searchIBIZOrderDetailXByIBIZOrder(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody IBIZOrderDetailSearchContext context) {
context.setN_ibizorderid_eq(ibizorder_id);
Page<IBIZOrderDetail> domains = ibizorderdetailService.searchX(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(ibizorderdetailMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册