feat(制品库功能完善): 受控库和产品库 均增加 名称和标识字段
原制品库(产品库)名称更改为制品库(产品库)标识
This commit is contained in:
parent
7fc3070728
commit
d59def1b42
|
|
@ -37,7 +37,7 @@ public class PmsProductLibraryComponentController extends BaseController {
|
|||
@GetMapping("/{repoName}/list")
|
||||
@ApiOperation(value = "查询制品列表")
|
||||
public AjaxResult list(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName,
|
||||
@ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
|
||||
@Valid ComponentSearchVo componentSearchVo) {
|
||||
componentSearchVo.setRepositoryName(repoName);
|
||||
NexusComponentResultVo<List<NexusResultDataVo>> result =
|
||||
|
|
@ -162,7 +162,7 @@ public class PmsProductLibraryComponentController extends BaseController {
|
|||
@PostMapping("/{repoName}/maven")
|
||||
@ApiOperation(value = "maven类型制品库上传制品")
|
||||
public AjaxResult uploadMavenAsset(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName,
|
||||
@ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
|
||||
@Valid @RequestBody ComponentMavenInputVo componentMavenInputVo) {
|
||||
componentMavenInputVo.setRepoName(repoName);
|
||||
componentMavenInputVo.setEnterpriseIdentifier(enterpriseIdentifier);
|
||||
|
|
@ -177,7 +177,7 @@ public class PmsProductLibraryComponentController extends BaseController {
|
|||
@PostMapping("/{repoName}/npm")
|
||||
@ApiOperation(value = "npm类型制品库上传制品")
|
||||
public AjaxResult uploadNpmAsset(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName,
|
||||
@ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
|
||||
@Valid @RequestBody ComponentInputVo componentInputVo) {
|
||||
componentInputVo.setRepoName(repoName);
|
||||
componentInputVo.setEnterpriseIdentifier(enterpriseIdentifier);
|
||||
|
|
@ -192,7 +192,7 @@ public class PmsProductLibraryComponentController extends BaseController {
|
|||
@PostMapping("/{repoName}/pypi")
|
||||
@ApiOperation(value = "pypi类型制品库上传制品")
|
||||
public AjaxResult uploadPypiAsset(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName,
|
||||
@ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
|
||||
@Valid @RequestBody ComponentInputVo componentInputVo) {
|
||||
componentInputVo.setRepoName(repoName);
|
||||
componentInputVo.setEnterpriseIdentifier(enterpriseIdentifier);
|
||||
|
|
@ -207,7 +207,7 @@ public class PmsProductLibraryComponentController extends BaseController {
|
|||
@PostMapping("/{repoName}/raw")
|
||||
@ApiOperation(value = "raw类型制品库上传制品")
|
||||
public AjaxResult uploadRawAsset(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName,
|
||||
@ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
|
||||
@Valid @RequestBody ComponentRawInputVo componentRawInputVo) {
|
||||
componentRawInputVo.setRepoName(repoName);
|
||||
componentRawInputVo.setEnterpriseIdentifier(enterpriseIdentifier);
|
||||
|
|
@ -222,7 +222,7 @@ public class PmsProductLibraryComponentController extends BaseController {
|
|||
@PostMapping("/{repoName}/go")
|
||||
@ApiOperation(value = "go类型制品库上传制品")
|
||||
public AjaxResult uploadGoAsset(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName,
|
||||
@ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
|
||||
@Valid @RequestBody ComponentRawInputVo componentRawInputVo) {
|
||||
componentRawInputVo.setRepoName(repoName);
|
||||
componentRawInputVo.setEnterpriseIdentifier(enterpriseIdentifier);
|
||||
|
|
@ -238,7 +238,7 @@ public class PmsProductLibraryComponentController extends BaseController {
|
|||
@PostMapping("/{repoName}/conda")
|
||||
@ApiOperation(value = "conda类型制品库上传制品")
|
||||
public AjaxResult uploadCondaAsset(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName,
|
||||
@ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
|
||||
@Valid @RequestBody ComponentRawInputVo componentRawInputVo) {
|
||||
componentRawInputVo.setRepoName(repoName);
|
||||
componentRawInputVo.setEnterpriseIdentifier(enterpriseIdentifier);
|
||||
|
|
@ -254,7 +254,7 @@ public class PmsProductLibraryComponentController extends BaseController {
|
|||
@PostMapping("/{repoName}/xxxxx")
|
||||
@ApiOperation(value = "xxxxx类型制品库上传制品")
|
||||
public AjaxResult uploadXxxxxAsset(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName,
|
||||
@ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
|
||||
@Valid @RequestBody ComponentRawInputVo componentRawInputVo) {
|
||||
componentRawInputVo.setRepoName(repoName);
|
||||
componentRawInputVo.setEnterpriseIdentifier(enterpriseIdentifier);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class PmsProductLibraryController extends BaseController {
|
|||
@GetMapping("/byRepoName/{repoName}")
|
||||
@ApiOperation(value = "获取产品库详情")
|
||||
public GenericsAjaxResult<PmsProductLibraryRepositoriesDataVo> getByRepoName(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "产品库名称", required = true) @PathVariable String repoName) {
|
||||
@ApiParam(value = "产品库标识", required = true) @PathVariable String repoName) {
|
||||
return GenericsAjaxResult.success(pmsProductLibraryProductRepoService.selectPmsProductLibraryDataByName(enterpriseIdentifier, repoName));
|
||||
}
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ public class PmsProductLibraryController extends BaseController {
|
|||
@ApiOperation(value = "查询产品库列表")
|
||||
public GenericsTableDataInfo<PmsProductLibrarySimpleVo> list(
|
||||
@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam("模糊搜索产品库名称") String name) {
|
||||
@ApiParam("模糊搜索产品库标识") String name) {
|
||||
startPage();
|
||||
return pmsProductLibraryProductRepoService.selectPmsProductLibraryPageList(enterpriseIdentifier, name);
|
||||
}
|
||||
|
|
@ -80,7 +80,7 @@ public class PmsProductLibraryController extends BaseController {
|
|||
@PutMapping("/{name}")
|
||||
@ApiOperation(value = "更新产品库")
|
||||
public AjaxResult editProduct(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "产品库名称", required = true) @PathVariable String name,
|
||||
@ApiParam(value = "产品库标识", required = true) @PathVariable String name,
|
||||
@Valid @RequestBody ProductRepositoriesOperateVo productRepositoriesOperateVo) {
|
||||
productRepositoriesOperateVo.setEnterpriseIdentifier(enterpriseIdentifier);
|
||||
productRepositoriesOperateVo.setName(name);
|
||||
|
|
@ -95,7 +95,7 @@ public class PmsProductLibraryController extends BaseController {
|
|||
@DeleteMapping("/{name}")
|
||||
@ApiOperation(value = "删除产品库")
|
||||
public AjaxResult remove(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "产品库名称", required = true) @PathVariable String name) {
|
||||
@ApiParam(value = "产品库标识", required = true) @PathVariable String name) {
|
||||
return toAjax(pmsProductLibraryProductRepoService.deletePmsProductLibraryByName(enterpriseIdentifier, name));
|
||||
}
|
||||
|
||||
|
|
@ -108,7 +108,7 @@ public class PmsProductLibraryController extends BaseController {
|
|||
@PostMapping("/{name}")
|
||||
@ApiOperation(value = "上传产品库制品")
|
||||
public AjaxResult uploadProductAsset(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "产品库名称", required = true) @PathVariable String name,
|
||||
@ApiParam(value = "产品库标识", required = true) @PathVariable String name,
|
||||
@Valid @RequestBody ComponentRawInputVo componentRawInputVo) {
|
||||
componentRawInputVo.setRepoName(name);
|
||||
componentRawInputVo.setEnterpriseIdentifier(enterpriseIdentifier);
|
||||
|
|
@ -123,7 +123,7 @@ public class PmsProductLibraryController extends BaseController {
|
|||
@GetMapping("/{repoName}/component/list")
|
||||
@ApiOperation(value = "产品库查询制品列表")
|
||||
public AjaxResult list(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "产品库名称", required = true) @PathVariable String repoName,
|
||||
@ApiParam(value = "产品库标识", required = true) @PathVariable String repoName,
|
||||
@Valid ComponentSearchVo componentSearchVo) {
|
||||
componentSearchVo.setRepositoryName(repoName);
|
||||
NexusComponentResultVo<List<NexusResultDataVo>> result =
|
||||
|
|
@ -138,7 +138,7 @@ public class PmsProductLibraryController extends BaseController {
|
|||
@GetMapping(value = "/{repoName}/component/readAsset/{assetId}")
|
||||
@ApiOperation(value = "产品库获取制品文件详细信息")
|
||||
public AjaxResult getAssetDetail(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "产品库名称", required = true) @PathVariable("repoName") String repoName,
|
||||
@ApiParam(value = "产品库标识", required = true) @PathVariable("repoName") String repoName,
|
||||
@PathVariable("assetId") String assetId) {
|
||||
NexusComponentResultVo<NexusAssetResultDataVo> result =
|
||||
pmsProductLibraryComponentService.getAssetDetailByAssetId(enterpriseIdentifier, repoName, null, assetId, true);
|
||||
|
|
@ -152,7 +152,7 @@ public class PmsProductLibraryController extends BaseController {
|
|||
@GetMapping(value = "/{repoName}/component/readComponent/{componentId}")
|
||||
@ApiOperation(value = "产品库获取制品详细信息")
|
||||
public AjaxResult getComponentDetail(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "产品库名称", required = true) @PathVariable("repoName") String repoName,
|
||||
@ApiParam(value = "产品库标识", required = true) @PathVariable("repoName") String repoName,
|
||||
@PathVariable("componentId") String componentId) {
|
||||
NexusComponentResultVo<NexusComponentResultDataVo> result =
|
||||
pmsProductLibraryComponentService.getComponentDetailByComponentId(enterpriseIdentifier, repoName, null, componentId, true);
|
||||
|
|
@ -165,7 +165,7 @@ public class PmsProductLibraryController extends BaseController {
|
|||
@GetMapping("/{repoName}/component/canDeleteFolder")
|
||||
@ApiOperation(value = "产品库获取制品文件夹是否能删除的状态")
|
||||
public AjaxResult canDeleteFolder(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "产品库名称", required = true) @PathVariable String repoName,
|
||||
@ApiParam(value = "产品库标识", required = true) @PathVariable String repoName,
|
||||
@Valid ComponentSearchVo componentSearchVo) {
|
||||
componentSearchVo.setRepositoryName(repoName);
|
||||
NexusComponentResultVo<Boolean> result =
|
||||
|
|
@ -179,7 +179,7 @@ public class PmsProductLibraryController extends BaseController {
|
|||
@GetMapping("/{repoName}/component/canDeleteComponent/{componentId}")
|
||||
@ApiOperation(value = "产品库获取制品是否能删除的状态")
|
||||
public AjaxResult canDeleteComponent(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "产品库名称", required = true) @PathVariable("repoName") String repoName,
|
||||
@ApiParam(value = "产品库标识", required = true) @PathVariable("repoName") String repoName,
|
||||
@PathVariable("componentId") String componentId) {
|
||||
NexusComponentResultVo<Boolean> result =
|
||||
pmsProductLibraryComponentService.getCanDeleteComponentByComponentId(enterpriseIdentifier, repoName, null, componentId, true);
|
||||
|
|
@ -192,7 +192,7 @@ public class PmsProductLibraryController extends BaseController {
|
|||
@GetMapping("/{repoName}/component/canDeleteAsset/{assetId}")
|
||||
@ApiOperation(value = "产品库获取制品文件是否能删除的状态")
|
||||
public AjaxResult canDeleteAsset(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "产品库名称", required = true) @PathVariable("repoName") String repoName,
|
||||
@ApiParam(value = "产品库标识", required = true) @PathVariable("repoName") String repoName,
|
||||
@PathVariable("assetId") String assetId) {
|
||||
NexusComponentResultVo<Boolean> result =
|
||||
pmsProductLibraryComponentService.getCanDeleteAssetByAssetId(enterpriseIdentifier, repoName, null, assetId, true);
|
||||
|
|
@ -205,7 +205,7 @@ public class PmsProductLibraryController extends BaseController {
|
|||
@DeleteMapping("/{repoName}/component/deleteAsset/{assetId}")
|
||||
@ApiOperation(value = "产品库删除制品文件")
|
||||
public AjaxResult deleteAsset(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "产品库名称", required = true) @PathVariable("repoName") String repoName,
|
||||
@ApiParam(value = "产品库标识", required = true) @PathVariable("repoName") String repoName,
|
||||
@PathVariable("assetId") String assetId) {
|
||||
NexusComponentResultVo<List<String>> result =
|
||||
pmsProductLibraryComponentService.deleteAssetByAssetId(enterpriseIdentifier, repoName, null, assetId, true);
|
||||
|
|
@ -218,7 +218,7 @@ public class PmsProductLibraryController extends BaseController {
|
|||
@DeleteMapping("/{repoName}/component/deleteComponent/{componentId}")
|
||||
@ApiOperation(value = "产品库删除制品")
|
||||
public AjaxResult deleteComponent(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "产品库名称", required = true) @PathVariable("repoName") String repoName,
|
||||
@ApiParam(value = "产品库标识", required = true) @PathVariable("repoName") String repoName,
|
||||
@PathVariable("componentId") String componentId) {
|
||||
NexusComponentResultVo<List<String>> result =
|
||||
pmsProductLibraryComponentService.deleteComponentByComponentId(enterpriseIdentifier, repoName, null, componentId, true);
|
||||
|
|
@ -231,7 +231,7 @@ public class PmsProductLibraryController extends BaseController {
|
|||
@DeleteMapping("/{repoName}/component/deleteFolder")
|
||||
@ApiOperation(value = "产品库异步删除制品文件夹")
|
||||
public AjaxResult deleteFolder(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "产品库名称", required = true) @PathVariable("repoName") String repoName,
|
||||
@ApiParam(value = "产品库标识", required = true) @PathVariable("repoName") String repoName,
|
||||
@Valid ComponentSearchVo componentSearchVo) {
|
||||
componentSearchVo.setRepositoryName(repoName);
|
||||
NexusComponentResultVo<Object> result =
|
||||
|
|
@ -246,8 +246,8 @@ public class PmsProductLibraryController extends BaseController {
|
|||
@GetMapping("/{productRepoName}/{repoName}/keyComponent/list")
|
||||
@ApiOperation(value = "制品库查询关键制品列表")
|
||||
public AjaxResult keyComponentList(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "产品库名称", required = true) @PathVariable("productRepoName") String productRepoName,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable("repoName") String repoName,
|
||||
@ApiParam(value = "产品库标识", required = true) @PathVariable("productRepoName") String productRepoName,
|
||||
@ApiParam(value = "制品库标识", required = true) @PathVariable("repoName") String repoName,
|
||||
@Valid ComponentSearchVo componentSearchVo) {
|
||||
componentSearchVo.setRepositoryName(repoName);
|
||||
componentSearchVo.setProductRepoName(productRepoName);
|
||||
|
|
@ -264,8 +264,8 @@ public class PmsProductLibraryController extends BaseController {
|
|||
@PostMapping("/{productRepoName}/commonAssetToProductRepo/{repoName}")
|
||||
@ApiOperation(value = "选择普通制品移入产品库")
|
||||
public AjaxResult addCommonAssetToProductRepo(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam("产品库名称") @PathVariable String productRepoName,
|
||||
@ApiParam("制品库名称") @PathVariable String repoName,
|
||||
@ApiParam("产品库标识") @PathVariable String productRepoName,
|
||||
@ApiParam("制品库标识") @PathVariable String repoName,
|
||||
@Valid @RequestBody CommonAssetAddToProductRepoVo commonAssetAddToProductRepoVo) {
|
||||
commonAssetAddToProductRepoVo.setEnterpriseIdentifier(enterpriseIdentifier);
|
||||
commonAssetAddToProductRepoVo.setProductRepoName(productRepoName);
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ public class PmsProductLibraryRepositoriesController extends BaseController {
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 新增制品库-仓库
|
||||
*/
|
||||
// @RequiresPermissions("pms:pmsProductLibraryRepositories:add")
|
||||
|
|
@ -104,7 +105,7 @@ public class PmsProductLibraryRepositoriesController extends BaseController {
|
|||
@PutMapping("/hosted/{format}/{name}")
|
||||
@ApiOperation(value = "更新托管仓库")
|
||||
public AjaxResult editHosted(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable String name,
|
||||
@ApiParam(value = "制品库标识", required = true) @PathVariable String name,
|
||||
@Valid @RequestBody HostedRepositoriesOperateVo hostedRepositoriesOperateVo) {
|
||||
hostedRepositoriesOperateVo.setEnterpriseIdentifier(enterpriseIdentifier);
|
||||
hostedRepositoriesOperateVo.setName(name);
|
||||
|
|
@ -119,7 +120,7 @@ public class PmsProductLibraryRepositoriesController extends BaseController {
|
|||
@PutMapping("/group/{format}/{name}")
|
||||
@ApiOperation(value = "更新虚拟仓库")
|
||||
public AjaxResult editGroup(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "虚拟仓库名称", required = true) @PathVariable String name,
|
||||
@ApiParam(value = "虚拟仓库标识", required = true) @PathVariable String name,
|
||||
@Valid @RequestBody GroupRepositoriesOperateVo groupRepositoriesOperateVo) {
|
||||
groupRepositoriesOperateVo.setEnterpriseIdentifier(enterpriseIdentifier);
|
||||
groupRepositoriesOperateVo.setName(name);
|
||||
|
|
@ -134,7 +135,7 @@ public class PmsProductLibraryRepositoriesController extends BaseController {
|
|||
@DeleteMapping("/{name}")
|
||||
@ApiOperation(value = "删除制品库")
|
||||
public AjaxResult remove(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable String name) {
|
||||
@ApiParam(value = "制品库标识", required = true) @PathVariable String name) {
|
||||
return toAjax(pmsProductLibraryRepositoriesService.deletePmsProductLibraryRepositoriesByName(enterpriseIdentifier, name));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ public class PmsProductLibrarySnapshotController extends BaseController {
|
|||
@GetMapping("/byRepoName/{repoName}/{snapshotName}")
|
||||
@ApiOperation(value = "获取快照库详情")
|
||||
public GenericsAjaxResult<PmsProductLibraryRepositoriesDataVo> getSnapshotByRepoName(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName,
|
||||
@ApiParam(value = "快照库名称", required = true) @PathVariable String snapshotName) {
|
||||
@ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
|
||||
@ApiParam(value = "快照库标识", required = true) @PathVariable String snapshotName) {
|
||||
return GenericsAjaxResult.success(pmsProductLibrarySnapshotRepoService.selectPmsProductLibrarySnapshotDataByName(enterpriseIdentifier, repoName, snapshotName));
|
||||
}
|
||||
|
||||
|
|
@ -54,8 +54,8 @@ public class PmsProductLibrarySnapshotController extends BaseController {
|
|||
@ApiOperation(value = "查询快照库列表")
|
||||
public GenericsTableDataInfo<PmsProductLibrarySnapshotSimpleVo> list(
|
||||
@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName,
|
||||
@ApiParam("模糊搜索快照库名称") String snapshotName) {
|
||||
@ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
|
||||
@ApiParam("模糊搜索快照库标识") String snapshotName) {
|
||||
startPage();
|
||||
return pmsProductLibrarySnapshotRepoService.selectPmsProductLibrarySnapshotPageList(enterpriseIdentifier, repoName, snapshotName);
|
||||
}
|
||||
|
|
@ -68,7 +68,7 @@ public class PmsProductLibrarySnapshotController extends BaseController {
|
|||
@PostMapping("/{repoName}")
|
||||
@ApiOperation(value = "新增快照库")
|
||||
public AjaxResult addSnapshot(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName,
|
||||
@ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
|
||||
@Valid @RequestBody ProductRepositoriesSnapshotInputVo productRepositoriesSnapshotInputVo) {
|
||||
productRepositoriesSnapshotInputVo.setEnterpriseIdentifier(enterpriseIdentifier);
|
||||
productRepositoriesSnapshotInputVo.setRepoName(repoName);
|
||||
|
|
@ -83,8 +83,8 @@ public class PmsProductLibrarySnapshotController extends BaseController {
|
|||
@DeleteMapping("/{repoName}/{snapshotName}")
|
||||
@ApiOperation(value = "删除快照库")
|
||||
public AjaxResult remove(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName,
|
||||
@ApiParam(value = "快照库名称", required = true) @PathVariable String snapshotName) {
|
||||
@ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
|
||||
@ApiParam(value = "快照库标识", required = true) @PathVariable String snapshotName) {
|
||||
return toAjax(pmsProductLibrarySnapshotRepoService.deletePmsProductLibrarySnapshotRepoByName(enterpriseIdentifier, repoName, snapshotName));
|
||||
}
|
||||
|
||||
|
|
@ -95,8 +95,8 @@ public class PmsProductLibrarySnapshotController extends BaseController {
|
|||
@GetMapping("/{repoName}/{snapshotName}/component/list")
|
||||
@ApiOperation(value = "快照库查询制品列表")
|
||||
public AjaxResult list(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName,
|
||||
@ApiParam(value = "快照名称", required = true) @PathVariable String snapshotName,
|
||||
@ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
|
||||
@ApiParam(value = "快照标识", required = true) @PathVariable String snapshotName,
|
||||
@Valid ComponentSearchVo componentSearchVo) {
|
||||
componentSearchVo.setRepositoryName(repoName);
|
||||
componentSearchVo.setSnapshotRepoName(snapshotName);
|
||||
|
|
@ -112,8 +112,8 @@ public class PmsProductLibrarySnapshotController extends BaseController {
|
|||
@GetMapping(value = "/{repoName}/{snapshotName}/component/readAsset/{assetId}")
|
||||
@ApiOperation(value = "快照库获取制品文件详细信息")
|
||||
public AjaxResult getAssetDetail(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable("repoName") String repoName,
|
||||
@ApiParam(value = "快照名称", required = true) @PathVariable("snapshotName") String snapshotName,
|
||||
@ApiParam(value = "制品库标识", required = true) @PathVariable("repoName") String repoName,
|
||||
@ApiParam(value = "快照标识", required = true) @PathVariable("snapshotName") String snapshotName,
|
||||
@PathVariable("assetId") String assetId) {
|
||||
NexusComponentResultVo<NexusAssetResultDataVo> result =
|
||||
pmsProductLibraryComponentService.getAssetDetailByAssetId(enterpriseIdentifier, repoName, snapshotName, assetId, false);
|
||||
|
|
@ -127,8 +127,8 @@ public class PmsProductLibrarySnapshotController extends BaseController {
|
|||
@GetMapping(value = "/{repoName}/{snapshotName}/component/readComponent/{componentId}")
|
||||
@ApiOperation(value = "快照库获取制品详细信息")
|
||||
public AjaxResult getComponentDetail(@PathVariable String enterpriseIdentifier,
|
||||
@ApiParam(value = "制品库名称", required = true) @PathVariable("repoName") String repoName,
|
||||
@ApiParam(value = "快照名称", required = true) @PathVariable("snapshotName") String snapshotName,
|
||||
@ApiParam(value = "制品库标识", required = true) @PathVariable("repoName") String repoName,
|
||||
@ApiParam(value = "快照标识", required = true) @PathVariable("snapshotName") String snapshotName,
|
||||
@PathVariable("componentId") String componentId) {
|
||||
NexusComponentResultVo<NexusComponentResultDataVo> result =
|
||||
pmsProductLibraryComponentService.getComponentDetailByComponentId(enterpriseIdentifier, repoName, snapshotName, componentId, false);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ public class PmsProductLibraryRepositories extends BaseEntity {
|
|||
/**
|
||||
* 预留字段2
|
||||
*/
|
||||
@ApiModelProperty(value = "快照名称")
|
||||
@ApiModelProperty(value = "快照标识")
|
||||
private String snapshotName;
|
||||
|
||||
public PmsProductLibraryRepositoriesDataVo toPmsProductLibraryRepositoriesDataVo() {
|
||||
|
|
@ -108,27 +108,27 @@ public class PmsProductLibraryRepositories extends BaseEntity {
|
|||
}
|
||||
|
||||
/**
|
||||
* 在Nexus上创建的产品库名称应该为用户输入的product+制品库名称+企业标识
|
||||
* 在Nexus上创建的产品库标识应该为用户输入的product+制品库标识+企业标识
|
||||
*
|
||||
* @return Nexus产品库名称
|
||||
* @return Nexus产品库标识
|
||||
*/
|
||||
public static String getNexusProductRepositoriesName(String enterpriseIdentifier, String name) {
|
||||
return String.format("product-%s-%s", enterpriseIdentifier, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* 在Nexus上创建的快照库名称应该为用户输入的snapshot+企业标识+制品库名称+快照库名称
|
||||
* 在Nexus上创建的快照库标识应该为用户输入的snapshot+企业标识+制品库标识+快照库标识
|
||||
*
|
||||
* @return Nexus快照库名称
|
||||
* @return Nexus快照库标识
|
||||
*/
|
||||
public static String getNexusSnapshotRepositoriesName(String enterpriseIdentifier, String repoName, String snapshotName) {
|
||||
return String.format("snapshot-%s-%s-%s", enterpriseIdentifier, repoName, snapshotName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 在Nexus上创建的制品库名称应该为用户输入的制品库名称+企业标识
|
||||
* 在Nexus上创建的制品库标识应该为用户输入的制品库标识+企业标识
|
||||
*
|
||||
* @return Nexus制品库名称
|
||||
* @return Nexus制品库标识
|
||||
*/
|
||||
public static String getNexusRepositoriesName(String enterpriseIdentifier, String name) {
|
||||
return String.format("%s-%s", enterpriseIdentifier, name);
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ public class CommonAssetAddToProductRepoVo {
|
|||
@ApiModelProperty(value = "制品Id列表")
|
||||
@Size(min = 1, message = "制品Id列表不能为空")
|
||||
private List<String> assetIdList;
|
||||
@ApiModelProperty(value = "制品库名称", hidden = true)
|
||||
@ApiModelProperty(value = "制品库标识", hidden = true)
|
||||
private String productRepoName;
|
||||
@ApiModelProperty(value = "制品库名称", hidden = true)
|
||||
@ApiModelProperty(value = "制品库标识", hidden = true)
|
||||
private String repoName;
|
||||
@ApiModelProperty(value = "组织标识", hidden = true)
|
||||
private String enterpriseIdentifier;
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ import javax.validation.constraints.NotNull;
|
|||
@Data
|
||||
@ApiModel("制品通用输入对象")
|
||||
public class ComponentInputVo {
|
||||
@ApiModelProperty(value = "制品库名称", hidden = true)
|
||||
@ApiModelProperty(value = "制品库标识", hidden = true)
|
||||
private String repoName;
|
||||
@ApiModelProperty(value = "快照库名称", hidden = true)
|
||||
@ApiModelProperty(value = "快照库标识", hidden = true)
|
||||
private String snapshotName;
|
||||
@ApiModelProperty(value = "组织标识", hidden = true)
|
||||
private String enterpriseIdentifier;
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ import java.util.List;
|
|||
@Data
|
||||
@ApiModel("制品Maven输入对象")
|
||||
public class ComponentMavenInputVo {
|
||||
@ApiModelProperty(value = "制品库名称", hidden = true)
|
||||
@ApiModelProperty(value = "制品库标识", hidden = true)
|
||||
private String repoName;
|
||||
@ApiModelProperty(value = "快照库名称", hidden = true)
|
||||
@ApiModelProperty(value = "快照库标识", hidden = true)
|
||||
private String snapshotName;
|
||||
@ApiModelProperty(value = "组织标识", hidden = true)
|
||||
private String enterpriseIdentifier;
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@ import java.util.List;
|
|||
@Data
|
||||
@ApiModel("制品Raw输入对象")
|
||||
public class ComponentRawInputVo {
|
||||
@ApiModelProperty(value = "制品库名称", hidden = true)
|
||||
@ApiModelProperty(value = "制品库标识", hidden = true)
|
||||
private String repoName;
|
||||
@ApiModelProperty(value = "快照库名称", hidden = true)
|
||||
@ApiModelProperty(value = "快照库标识", hidden = true)
|
||||
private String snapshotName;
|
||||
@ApiModelProperty(value = "组织标识", hidden = true)
|
||||
private String enterpriseIdentifier;
|
||||
|
|
|
|||
|
|
@ -24,20 +24,20 @@ public class ComponentSearchVo {
|
|||
private String node;
|
||||
|
||||
/**
|
||||
* 制品库名称
|
||||
* 制品库标识
|
||||
*/
|
||||
@ApiModelProperty(value = "制品库名称", hidden = true)
|
||||
@ApiModelProperty(value = "制品库标识", hidden = true)
|
||||
private String repositoryName;
|
||||
|
||||
/**
|
||||
* 快照库名称
|
||||
* 快照库标识
|
||||
*/
|
||||
@ApiModelProperty(value = "快照库名称", hidden = true)
|
||||
@ApiModelProperty(value = "快照库标识", hidden = true)
|
||||
private String snapshotRepoName;
|
||||
|
||||
/**
|
||||
* 产品库名称
|
||||
* 产品库标识
|
||||
*/
|
||||
@ApiModelProperty(value = "产品库名称", hidden = true)
|
||||
@ApiModelProperty(value = "产品库标识", hidden = true)
|
||||
private String productRepoName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,14 +43,14 @@ public class NexusAssetResultDataVo {
|
|||
@ApiModelProperty(value = "制品文件大小")
|
||||
private int size;
|
||||
/**
|
||||
* 制品库名称
|
||||
* 制品库标识
|
||||
*/
|
||||
@ApiModelProperty(value = "制品库名称")
|
||||
@ApiModelProperty(value = "制品库标识")
|
||||
private String repositoryName;
|
||||
/**
|
||||
* 包含制品库名称
|
||||
* 包含制品库标识
|
||||
*/
|
||||
@ApiModelProperty(value = "包含制品库名称")
|
||||
@ApiModelProperty(value = "包含制品库标识")
|
||||
private String containingRepositoryName;
|
||||
/**
|
||||
* 制品文件创建时间
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public class NexusAssetVo {
|
|||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 制品库名称
|
||||
* 制品库标识
|
||||
*/
|
||||
private String repository;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ public class NexusComponentResultDataVo {
|
|||
@ApiModelProperty(value = "制品所在组")
|
||||
private String group;
|
||||
/**
|
||||
* 制品库名称
|
||||
* 制品库标识
|
||||
*/
|
||||
@ApiModelProperty(value = "制品库名称")
|
||||
@ApiModelProperty(value = "制品库标识")
|
||||
private String repositoryName;
|
||||
/**
|
||||
* 制品版本
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public class NexusDockerComponentVo {
|
|||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 制品库名称
|
||||
* 制品库标识
|
||||
*/
|
||||
private String repository;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ import lombok.Data;
|
|||
@ApiModel("快照库简化对象")
|
||||
public class PmsProductLibrarySnapshotSimpleVo extends PmsProductLibrarySimpleVo {
|
||||
/**
|
||||
* 快照名称
|
||||
* 快照标识
|
||||
*/
|
||||
@ApiModelProperty(value = "快照名称")
|
||||
@ApiModelProperty(value = "快照标识")
|
||||
private String snapshotName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ import javax.validation.constraints.Pattern;
|
|||
@Data
|
||||
@ApiModel("快照库输入对象")
|
||||
public class ProductRepositoriesSnapshotInputVo {
|
||||
@ApiModelProperty(value = "快照库名称(非必填,未填将根据时分秒生成名称)")
|
||||
@Pattern(regexp = "^[A-Za-z0-9](?!_)(?!\\.)[A-Za-z0-9_\\-.]*$", message = "快照库名称不符合规范")
|
||||
@ApiModelProperty(value = "快照库标识(非必填,未填将根据时分秒生成名称)")
|
||||
@Pattern(regexp = "^[A-Za-z0-9](?!_)(?!\\.)[A-Za-z0-9_\\-.]*$", message = "快照库标识不符合规范")
|
||||
private String name;
|
||||
@ApiModelProperty(value = "制品库名称", hidden = true)
|
||||
@ApiModelProperty(value = "制品库标识", hidden = true)
|
||||
private String repoName;
|
||||
@ApiModelProperty(value = "关联企业标识", hidden = true)
|
||||
private String enterpriseIdentifier;
|
||||
|
|
|
|||
|
|
@ -63,10 +63,10 @@ public interface PmsProductLibraryComponentMapper {
|
|||
public int deletePmsProductLibraryComponentByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 在组织下根据制品库名称和制品文件名称查找制品文件
|
||||
* 在组织下根据制品库标识和制品文件名称查找制品文件
|
||||
*
|
||||
* @param name 制品文件名称
|
||||
* @param repoId 制品库名称
|
||||
* @param repoId 制品库id
|
||||
* @param pmsEnterpriseId 组织Id
|
||||
* @return 制品文件
|
||||
*/
|
||||
|
|
@ -84,7 +84,7 @@ public interface PmsProductLibraryComponentMapper {
|
|||
* 查询对应路径下制品文件列表
|
||||
*
|
||||
* @param path 路径
|
||||
* @param repoId 制品库名称
|
||||
* @param repoId 制品库id
|
||||
* @param pmsEnterpriseId 组织Id
|
||||
* @return 制品文件列表
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public interface PmsProductLibraryRepositoriesMapper {
|
|||
/**
|
||||
* 根据名称查找制品库
|
||||
*
|
||||
* @param name 制品库名称
|
||||
* @param name 制品库标识
|
||||
* @param pmsEnterpriseIdentifier 企业标识
|
||||
* @param format 制品格式
|
||||
* @return 制品库数量
|
||||
|
|
@ -75,36 +75,47 @@ public interface PmsProductLibraryRepositoriesMapper {
|
|||
/**
|
||||
* 根据名称查找快照库数量
|
||||
*
|
||||
* @param repoName 制品库名称
|
||||
* @param snapshotName 快照库名称
|
||||
* @param repoName 制品库标识
|
||||
* @param snapshotName 快照库标识
|
||||
* @param pmsEnterpriseIdentifier 企业标识
|
||||
* @return 快照库数量
|
||||
*/
|
||||
Integer selectRepositoriesSnapshotBySnapshotNameCount(@Param("pmsEnterpriseIdentifier") String pmsEnterpriseIdentifier, @Param("repoName") String repoName, @Param("snapshotName") String snapshotName);
|
||||
|
||||
/**
|
||||
* 根据制品库名称查找制品库
|
||||
* 根据制品库别名查找制品库
|
||||
*
|
||||
* @param alias 制品库别名
|
||||
* @param pmsEnterpriseIdentifier 企业标识
|
||||
* @param format 制品格式
|
||||
* @return 制品库数量
|
||||
*/
|
||||
Integer selectPmsProductLibraryRepositoriesByAliasCount(@Param("alias") String alias, @Param("pmsEnterpriseIdentifier") String pmsEnterpriseIdentifier, @Param("format") String format);
|
||||
|
||||
/**
|
||||
* 根据制品库标识查找制品库
|
||||
*
|
||||
* @param pmsEnterpriseIdentifier 企业标识
|
||||
* @param name 制品库名称
|
||||
* @param name 制品库标识
|
||||
* @return 制品库
|
||||
*/
|
||||
PmsProductLibraryRepositories selectPmsProductLibraryRepositoriesByName(@Param("pmsEnterpriseIdentifier") String pmsEnterpriseIdentifier, @Param("name") String name);
|
||||
|
||||
/**
|
||||
* 根据产品库名称查找产品库
|
||||
* 根据产品库标识查找产品库
|
||||
*
|
||||
* @param pmsEnterpriseIdentifier 企业标识
|
||||
* @param name 产品库名称
|
||||
* @param name 产品库标识
|
||||
* @return 产品库
|
||||
*/
|
||||
PmsProductLibraryRepositories selectPmsProductLibraryByName(@Param("pmsEnterpriseIdentifier") String pmsEnterpriseIdentifier, @Param("name") String name);
|
||||
|
||||
/**
|
||||
* 根据制品库名称以及快照库名称查找快照库
|
||||
* 根据制品库标识以及快照库标识查找快照库
|
||||
*
|
||||
* @param pmsEnterpriseIdentifier 企业标识
|
||||
* @param repoName 制品库名称
|
||||
* @param snapshotName 快照库名称
|
||||
* @param repoName 制品库标识
|
||||
* @param snapshotName 快照库标识
|
||||
* @return 快照库
|
||||
*/
|
||||
PmsProductLibraryRepositories selectPmsProductLibrarySnapshotByName(@Param("pmsEnterpriseIdentifier") String pmsEnterpriseIdentifier, @Param("repoName") String repoName, @Param("snapshotName") String snapshotName);
|
||||
|
|
@ -112,7 +123,7 @@ public interface PmsProductLibraryRepositoriesMapper {
|
|||
* 查询产品库列表
|
||||
*
|
||||
* @param pmsEnterpriseIdentifier 企业标识
|
||||
* @param name 产品库名称
|
||||
* @param name 产品库标识
|
||||
* @return 产品库列表
|
||||
*/
|
||||
List<PmsProductLibraryRepositories> selectPmsProductLibraryList(@Param("pmsEnterpriseIdentifier") String pmsEnterpriseIdentifier, @Param("name") String name);
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public interface IPmsProductLibraryComponentService {
|
|||
* 获取制品文件详情
|
||||
*
|
||||
* @param enterpriseIdentifier 企业标识
|
||||
* @param repoName 制品库名称
|
||||
* @param repoName 制品库标识
|
||||
* @param assetId 制品文件标识
|
||||
* @param isProduct 是否产品库
|
||||
* @return 制品文件详情
|
||||
|
|
@ -75,7 +75,7 @@ public interface IPmsProductLibraryComponentService {
|
|||
* 获取制品详情
|
||||
*
|
||||
* @param enterpriseIdentifier 企业标识
|
||||
* @param repoName 制品库名称
|
||||
* @param repoName 制品库标识
|
||||
* @param componentId 制品标识
|
||||
* @param isProduct 是否产品库
|
||||
* @return 制品详情
|
||||
|
|
@ -100,7 +100,7 @@ public interface IPmsProductLibraryComponentService {
|
|||
* 删除制品
|
||||
*
|
||||
* @param enterpriseIdentifier 企业标识
|
||||
* @param repoName 制品库名称
|
||||
* @param repoName 制品库标识
|
||||
* @param snapshotName
|
||||
* @param assetId 制品文件
|
||||
* @param isProduct 是否产品库
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public interface IPmsProductLibraryProductRepoService {
|
|||
* 根据组织标识和名称查找产品库
|
||||
*
|
||||
* @param enterpriseIdentifier 组织标识
|
||||
* @param repoName 产品库名称
|
||||
* @param repoName 产品库标识
|
||||
* @return 产品库
|
||||
*/
|
||||
PmsProductLibraryRepositories selectPmsProductLibraryByName(String enterpriseIdentifier, String repoName);
|
||||
|
|
@ -27,7 +27,7 @@ public interface IPmsProductLibraryProductRepoService {
|
|||
* 查询产品库列表
|
||||
*
|
||||
* @param enterpriseIdentifier 企业标识
|
||||
* @param name 产品库名称
|
||||
* @param name 产品库标识
|
||||
* @return 产品库列表
|
||||
*/
|
||||
GenericsTableDataInfo<PmsProductLibrarySimpleVo> selectPmsProductLibraryPageList(String enterpriseIdentifier, String name);
|
||||
|
|
@ -53,7 +53,7 @@ public interface IPmsProductLibraryProductRepoService {
|
|||
* 删除产品库
|
||||
*
|
||||
* @param enterpriseIdentifier 组织标识
|
||||
* @param name 产品库名称
|
||||
* @param name 产品库标识
|
||||
* @return 产品库
|
||||
*/
|
||||
int deletePmsProductLibraryByName(String enterpriseIdentifier, String name);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public interface IPmsProductLibraryRepositoriesService {
|
|||
* 查询制品仓库分页列表
|
||||
*
|
||||
* @param enterpriseIdentifier 企业表示
|
||||
* @param searchVo 搜索制品库名称
|
||||
* @param searchVo 搜索制品库标识
|
||||
* @return 制品仓库分页列表
|
||||
*/
|
||||
GenericsTableDataInfo<PmsProductLibraryRepositoriesSimpleVo> selectPmsProductLibraryRepositoriesPageList(String enterpriseIdentifier, PmsProductLibraryRepositoriesSearchVo searchVo);
|
||||
|
|
@ -71,16 +71,16 @@ public interface IPmsProductLibraryRepositoriesService {
|
|||
* 通过名称删除制品库
|
||||
*
|
||||
* @param enterpriseIdentifier 组织标识
|
||||
* @param name 制品库名称
|
||||
* @param name 制品库标识
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deletePmsProductLibraryRepositoriesByName(String enterpriseIdentifier, String name);
|
||||
|
||||
/**
|
||||
* 根据组织标识和制品库名称查找制品库
|
||||
* 根据组织标识和制品库标识查找制品库
|
||||
*
|
||||
* @param enterpriseIdentifier 组织标识
|
||||
* @param repoName 制品库名称
|
||||
* @param repoName 制品库标识
|
||||
* @return 制品库
|
||||
*/
|
||||
PmsProductLibraryRepositories selectPmsProductLibraryRepositoriesByName(String enterpriseIdentifier, String repoName);
|
||||
|
|
@ -102,10 +102,10 @@ public interface IPmsProductLibraryRepositoriesService {
|
|||
int updateGroupPmsProductLibraryRepositories(GroupRepositoriesOperateVo groupRepositoriesOperateVo);
|
||||
|
||||
/**
|
||||
* 根据制品库名称获取制品库详情
|
||||
* 根据制品库标识获取制品库详情
|
||||
*
|
||||
* @param enterpriseIdentifier 组织标识
|
||||
* @param repoName 制品库名称
|
||||
* @param repoName 制品库标识
|
||||
* @return 制品库详情
|
||||
*/
|
||||
PmsProductLibraryRepositoriesDataVo selectPmsProductLibraryRepositoriesDataByName(String enterpriseIdentifier, String repoName);
|
||||
|
|
|
|||
|
|
@ -388,7 +388,7 @@ public class PmsProductLibraryComponentServiceImpl implements IPmsProductLibrary
|
|||
);
|
||||
pmsProductLibraryRepositoriesService.checkLockRepositoryStatus(repo.getPmsEnterpriseIdentifier(), repo.getId());
|
||||
if (!ProductLibraryRepositoriesFormatEnum.MAVEN.getKey().equals(repo.getFormat())) {
|
||||
throw new ServiceException("该制品库非Maven格式,无法上传(制品库名称[%s])", repo.getName());
|
||||
throw new ServiceException("该制品库非Maven格式,无法上传(制品库标识[%s])", repo.getName());
|
||||
}
|
||||
// 创建一个MultipartEntityBuilder
|
||||
MultipartEntityBuilder builder = MultipartEntityBuilder
|
||||
|
|
@ -458,7 +458,7 @@ public class PmsProductLibraryComponentServiceImpl implements IPmsProductLibrary
|
|||
pmsProductLibraryRepositoriesService.checkLockRepositoryStatus(repo.getPmsEnterpriseIdentifier(), repo.getId());
|
||||
|
||||
if (!componentRawInputVo.getFormat().equals(repo.getFormat())) {
|
||||
throw new ServiceException("该制品库非%s格式,无法上传(制品库名称[%s])", componentRawInputVo.getFormat(), repo.getName());
|
||||
throw new ServiceException("该制品库非%s格式,无法上传(制品库标识[%s])", componentRawInputVo.getFormat(), repo.getName());
|
||||
}
|
||||
// 创建一个MultipartEntityBuilder
|
||||
MultipartEntityBuilder builder = MultipartEntityBuilder
|
||||
|
|
@ -514,7 +514,7 @@ public class PmsProductLibraryComponentServiceImpl implements IPmsProductLibrary
|
|||
);
|
||||
pmsProductLibraryRepositoriesService.checkLockRepositoryStatus(repo.getPmsEnterpriseIdentifier(), repo.getId());
|
||||
if (!ProductLibraryRepositoriesFormatEnum.NPM.getKey().equals(repo.getFormat())) {
|
||||
throw new ServiceException("该制品库非Npm格式,无法上传(制品库名称[%s])", repo.getName());
|
||||
throw new ServiceException("该制品库非Npm格式,无法上传(制品库标识[%s])", repo.getName());
|
||||
}
|
||||
// 创建一个MultipartEntityBuilder
|
||||
MultipartEntityBuilder builder = MultipartEntityBuilder
|
||||
|
|
@ -553,7 +553,7 @@ public class PmsProductLibraryComponentServiceImpl implements IPmsProductLibrary
|
|||
componentInputVo.getSnapshotName());
|
||||
pmsProductLibraryRepositoriesService.checkLockRepositoryStatus(repo.getPmsEnterpriseIdentifier(), repo.getId());
|
||||
if (!ProductLibraryRepositoriesFormatEnum.PYPI.getKey().equals(repo.getFormat())) {
|
||||
throw new ServiceException("该制品库非Pypi格式,无法上传(制品库名称[%s])", repo.getName());
|
||||
throw new ServiceException("该制品库非Pypi格式,无法上传(制品库标识[%s])", repo.getName());
|
||||
}
|
||||
// 创建一个MultipartEntityBuilder
|
||||
MultipartEntityBuilder builder = MultipartEntityBuilder
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public class PmsProductLibraryProductRepoServiceImpl implements IPmsProductLibra
|
|||
PmsProductLibraryRepositories pmsProductLibraryRepositories =
|
||||
pmsProductLibraryRepositoriesMapper.selectPmsProductLibraryByName(enterpriseIdentifier, name);
|
||||
if (pmsProductLibraryRepositories == null) {
|
||||
throw new ServiceException("组织下不存在该产品库(组织标识[%s],产品库名称[%s])", enterpriseIdentifier, name);
|
||||
throw new ServiceException("组织下不存在该产品库(组织标识[%s],产品库标识[%s])", enterpriseIdentifier, name);
|
||||
}
|
||||
return pmsProductLibraryRepositories;
|
||||
}
|
||||
|
|
@ -103,11 +103,11 @@ public class PmsProductLibraryProductRepoServiceImpl implements IPmsProductLibra
|
|||
@Override
|
||||
public int insertPmsProductLibrary(ProductRepositoriesInputVo productRepositoriesInputVo) {
|
||||
PmsEnterprise pmsEnterprise = pmsEnterpriseService.selectPmsEnterpriseByIdentifier(productRepositoriesInputVo.getEnterpriseIdentifier());
|
||||
// 校验制品库名称
|
||||
// 校验制品库标识
|
||||
Integer count = pmsProductLibraryRepositoriesMapper.selectPmsProductLibraryRepositoriesByNameCount(
|
||||
productRepositoriesInputVo.getName(), productRepositoriesInputVo.getEnterpriseIdentifier(), productRepositoriesInputVo.getFormat());
|
||||
if (count > 0) {
|
||||
throw new ServiceException("该产品库名称在当前企业下已存在(产品库名称[%s])", productRepositoriesInputVo.getName());
|
||||
throw new ServiceException("该产品库标识在当前企业下已存在(产品库标识[%s])", productRepositoriesInputVo.getName());
|
||||
}
|
||||
NexusHostedRepoInputVo requestBody = productRepositoriesInputVo.toNexusRepoDataVo();
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class PmsProductLibraryRepositoriesServiceImpl implements IPmsProductLibr
|
|||
PmsProductLibraryRepositories pmsProductLibraryRepositories =
|
||||
pmsProductLibraryRepositoriesMapper.selectPmsProductLibraryRepositoriesByName(enterpriseIdentifier, name);
|
||||
if (pmsProductLibraryRepositories == null) {
|
||||
throw new ServiceException("组织下不存在该制品库(组织标识[%s],制品库名称[%s])", enterpriseIdentifier, name);
|
||||
throw new ServiceException("组织下不存在该制品库(组织标识[%s],制品库标识[%s])", enterpriseIdentifier, name);
|
||||
}
|
||||
return pmsProductLibraryRepositories;
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@ public class PmsProductLibraryRepositoriesServiceImpl implements IPmsProductLibr
|
|||
NexusRequestUrl.GET_REPOSITORIES(type, format, nexusRepoName),
|
||||
NexusHostedRepoInputVo.class);
|
||||
if (nexusRepo == null) {
|
||||
throw new ServiceException("该Nexus制品库不存在(制品库名称[%s]))", nexusRepoName);
|
||||
throw new ServiceException("该Nexus制品库不存在(制品库标识[%s]))", nexusRepoName);
|
||||
}
|
||||
return nexusRepo;
|
||||
}
|
||||
|
|
@ -80,11 +80,11 @@ public class PmsProductLibraryRepositoriesServiceImpl implements IPmsProductLibr
|
|||
@Override
|
||||
public int insertGroupPmsProductLibraryRepositories(GroupRepositoriesInputVo groupRepositoriesInputVo) {
|
||||
PmsEnterprise pmsEnterprise = pmsEnterpriseService.selectPmsEnterpriseByIdentifier(groupRepositoriesInputVo.getEnterpriseIdentifier());
|
||||
// 校验制品库名称
|
||||
// 校验制品库标识
|
||||
Integer count = pmsProductLibraryRepositoriesMapper.selectPmsProductLibraryRepositoriesByNameCount(
|
||||
groupRepositoriesInputVo.getName(), groupRepositoriesInputVo.getEnterpriseIdentifier(), groupRepositoriesInputVo.getFormat());
|
||||
if (count > 0) {
|
||||
throw new ServiceException("该制品库名称在当前企业下已存在(制品库名称[%s])", groupRepositoriesInputVo.getName());
|
||||
throw new ServiceException("该制品库标识在当前企业下已存在(制品库标识[%s])", groupRepositoriesInputVo.getName());
|
||||
}
|
||||
checkGroupMemberRepoList(groupRepositoriesInputVo);
|
||||
NexusGroupRepoInputVo requestBody = groupRepositoriesInputVo.toNexusGroupRepoInputVo();
|
||||
|
|
@ -164,11 +164,17 @@ public class PmsProductLibraryRepositoriesServiceImpl implements IPmsProductLibr
|
|||
@Override
|
||||
public int insertHostedPmsProductLibraryRepositories(HostedRepositoriesInputVo hostedPmsProductLibraryRepositoriesInputVo) {
|
||||
PmsEnterprise pmsEnterprise = pmsEnterpriseService.selectPmsEnterpriseByIdentifier(hostedPmsProductLibraryRepositoriesInputVo.getEnterpriseIdentifier());
|
||||
// 校验制品库名称
|
||||
Integer count = pmsProductLibraryRepositoriesMapper.selectPmsProductLibraryRepositoriesByNameCount(
|
||||
// 校验制品库标识
|
||||
Integer nameCount = pmsProductLibraryRepositoriesMapper.selectPmsProductLibraryRepositoriesByNameCount(
|
||||
hostedPmsProductLibraryRepositoriesInputVo.getName(), hostedPmsProductLibraryRepositoriesInputVo.getEnterpriseIdentifier(), hostedPmsProductLibraryRepositoriesInputVo.getFormat());
|
||||
if (count > 0) {
|
||||
throw new ServiceException("该制品库名称在当前企业下已存在(制品库名称[%s])", hostedPmsProductLibraryRepositoriesInputVo.getName());
|
||||
if (nameCount > 0) {
|
||||
throw new ServiceException("该制品库标识在当前企业下已存在(制品库标识[%s])", hostedPmsProductLibraryRepositoriesInputVo.getName());
|
||||
}
|
||||
// 校验制品库别名
|
||||
Integer aliasCount = pmsProductLibraryRepositoriesMapper.selectPmsProductLibraryRepositoriesByAliasCount(
|
||||
hostedPmsProductLibraryRepositoriesInputVo.getAlias(), hostedPmsProductLibraryRepositoriesInputVo.getEnterpriseIdentifier(), hostedPmsProductLibraryRepositoriesInputVo.getFormat());
|
||||
if (aliasCount > 0) {
|
||||
throw new ServiceException("该制品库标识在当前企业下已存在(制品库标识[%s])", hostedPmsProductLibraryRepositoriesInputVo.getName());
|
||||
}
|
||||
checkInputParameter(hostedPmsProductLibraryRepositoriesInputVo);
|
||||
NexusHostedRepoInputVo requestBody = hostedPmsProductLibraryRepositoriesInputVo.toNexusRepoDataVo();
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public class PmsProductLibrarySnapshotRepoServiceImpl implements IPmsProductLibr
|
|||
PmsProductLibraryRepositories pmsProductLibraryRepositories =
|
||||
pmsProductLibraryRepositoriesMapper.selectPmsProductLibrarySnapshotByName(enterpriseIdentifier, repoName, snapshotName);
|
||||
if (pmsProductLibraryRepositories == null) {
|
||||
throw new ServiceException("组织下不存在该快照库(组织标识[%s],制品库名称[%s],快照库名称[%s])", enterpriseIdentifier, repoName, snapshotName);
|
||||
throw new ServiceException("组织下不存在该快照库(组织标识[%s],制品库标识[%s],快照库标识[%s])", enterpriseIdentifier, repoName, snapshotName);
|
||||
}
|
||||
return pmsProductLibraryRepositories;
|
||||
}
|
||||
|
|
@ -78,7 +78,7 @@ public class PmsProductLibrarySnapshotRepoServiceImpl implements IPmsProductLibr
|
|||
|
||||
@Override
|
||||
public Long insertPmsProductLibrarySnapshot(ProductRepositoriesSnapshotInputVo snapshotInputVo) {
|
||||
// 未填快照库名称将根据时分秒生成名称
|
||||
// 未填快照库标识将根据时分秒生成名称
|
||||
if (StringUtils.isEmpty(snapshotInputVo.getName())) {
|
||||
snapshotInputVo.setName(DateUtils.dateTimeNow());
|
||||
}
|
||||
|
|
@ -88,13 +88,13 @@ public class PmsProductLibrarySnapshotRepoServiceImpl implements IPmsProductLibr
|
|||
if (ProductLibraryRepositoriesFormatEnum.DOCKER.getKey().equals(repo.getFormat())) {
|
||||
throw new ServiceException("Docker格式制品库不支持创建快照");
|
||||
}
|
||||
// 校验制品库名称
|
||||
// 校验制品库标识
|
||||
Integer count = pmsProductLibraryRepositoriesMapper.selectRepositoriesSnapshotBySnapshotNameCount(
|
||||
snapshotInputVo.getEnterpriseIdentifier(),
|
||||
repo.getName(),
|
||||
snapshotInputVo.getName());
|
||||
if (count > 0) {
|
||||
throw new ServiceException("该制品库下已存在相同快照库名称(制品库名称[%s],快照库名称[%s])", repo.getName(), snapshotInputVo.getName());
|
||||
throw new ServiceException("该制品库下已存在相同快照库标识(制品库标识[%s],快照库标识[%s])", repo.getName(), snapshotInputVo.getName());
|
||||
}
|
||||
NexusHostedRepoInputVo requestBody = snapshotInputVo.toNexusRepoDataVo(repo);
|
||||
|
||||
|
|
|
|||
|
|
@ -135,6 +135,22 @@
|
|||
and pe.enterprise_identifier = #{pmsEnterpriseIdentifier}
|
||||
and pplr.snapshot_name IS NOT NULL
|
||||
</select>
|
||||
<select id="selectPmsProductLibraryRepositoriesByAliasCount" resultType="java.lang.Integer">
|
||||
select count(0)
|
||||
from pms_product_library_repositories pplr
|
||||
left join pms_enterprise as pe on pplr.pms_enterprise_id = pe.id
|
||||
where pplr.alias = #{alias}
|
||||
and pe.enterprise_identifier = #{pmsEnterpriseIdentifier}
|
||||
<choose>
|
||||
<when test="format != null and format != 'product'">
|
||||
and pplr.format != 'product'
|
||||
and pplr.snapshot_name IS NULL
|
||||
</when>
|
||||
<otherwise>
|
||||
and pplr.format = 'product'
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<insert id="insertPmsProductLibraryRepositories" parameterType="PmsProductLibraryRepositories"
|
||||
useGeneratedKeys="true" keyProperty="id">
|
||||
|
|
|
|||
Loading…
Reference in New Issue