feat(制品库功能完善): 受控库和产品库 均增加 名称和标识字段

原制品库(产品库)名称更改为制品库(产品库)标识
This commit is contained in:
OTTO 2024-07-30 09:08:52 +08:00
parent 7fc3070728
commit d59def1b42
26 changed files with 155 additions and 121 deletions

View File

@ -37,7 +37,7 @@ public class PmsProductLibraryComponentController extends BaseController {
@GetMapping("/{repoName}/list") @GetMapping("/{repoName}/list")
@ApiOperation(value = "查询制品列表") @ApiOperation(value = "查询制品列表")
public AjaxResult list(@PathVariable String enterpriseIdentifier, public AjaxResult list(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName, @ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
@Valid ComponentSearchVo componentSearchVo) { @Valid ComponentSearchVo componentSearchVo) {
componentSearchVo.setRepositoryName(repoName); componentSearchVo.setRepositoryName(repoName);
NexusComponentResultVo<List<NexusResultDataVo>> result = NexusComponentResultVo<List<NexusResultDataVo>> result =
@ -162,7 +162,7 @@ public class PmsProductLibraryComponentController extends BaseController {
@PostMapping("/{repoName}/maven") @PostMapping("/{repoName}/maven")
@ApiOperation(value = "maven类型制品库上传制品") @ApiOperation(value = "maven类型制品库上传制品")
public AjaxResult uploadMavenAsset(@PathVariable String enterpriseIdentifier, public AjaxResult uploadMavenAsset(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName, @ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
@Valid @RequestBody ComponentMavenInputVo componentMavenInputVo) { @Valid @RequestBody ComponentMavenInputVo componentMavenInputVo) {
componentMavenInputVo.setRepoName(repoName); componentMavenInputVo.setRepoName(repoName);
componentMavenInputVo.setEnterpriseIdentifier(enterpriseIdentifier); componentMavenInputVo.setEnterpriseIdentifier(enterpriseIdentifier);
@ -177,7 +177,7 @@ public class PmsProductLibraryComponentController extends BaseController {
@PostMapping("/{repoName}/npm") @PostMapping("/{repoName}/npm")
@ApiOperation(value = "npm类型制品库上传制品") @ApiOperation(value = "npm类型制品库上传制品")
public AjaxResult uploadNpmAsset(@PathVariable String enterpriseIdentifier, public AjaxResult uploadNpmAsset(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName, @ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
@Valid @RequestBody ComponentInputVo componentInputVo) { @Valid @RequestBody ComponentInputVo componentInputVo) {
componentInputVo.setRepoName(repoName); componentInputVo.setRepoName(repoName);
componentInputVo.setEnterpriseIdentifier(enterpriseIdentifier); componentInputVo.setEnterpriseIdentifier(enterpriseIdentifier);
@ -192,7 +192,7 @@ public class PmsProductLibraryComponentController extends BaseController {
@PostMapping("/{repoName}/pypi") @PostMapping("/{repoName}/pypi")
@ApiOperation(value = "pypi类型制品库上传制品") @ApiOperation(value = "pypi类型制品库上传制品")
public AjaxResult uploadPypiAsset(@PathVariable String enterpriseIdentifier, public AjaxResult uploadPypiAsset(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName, @ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
@Valid @RequestBody ComponentInputVo componentInputVo) { @Valid @RequestBody ComponentInputVo componentInputVo) {
componentInputVo.setRepoName(repoName); componentInputVo.setRepoName(repoName);
componentInputVo.setEnterpriseIdentifier(enterpriseIdentifier); componentInputVo.setEnterpriseIdentifier(enterpriseIdentifier);
@ -207,7 +207,7 @@ public class PmsProductLibraryComponentController extends BaseController {
@PostMapping("/{repoName}/raw") @PostMapping("/{repoName}/raw")
@ApiOperation(value = "raw类型制品库上传制品") @ApiOperation(value = "raw类型制品库上传制品")
public AjaxResult uploadRawAsset(@PathVariable String enterpriseIdentifier, public AjaxResult uploadRawAsset(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName, @ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
@Valid @RequestBody ComponentRawInputVo componentRawInputVo) { @Valid @RequestBody ComponentRawInputVo componentRawInputVo) {
componentRawInputVo.setRepoName(repoName); componentRawInputVo.setRepoName(repoName);
componentRawInputVo.setEnterpriseIdentifier(enterpriseIdentifier); componentRawInputVo.setEnterpriseIdentifier(enterpriseIdentifier);
@ -222,7 +222,7 @@ public class PmsProductLibraryComponentController extends BaseController {
@PostMapping("/{repoName}/go") @PostMapping("/{repoName}/go")
@ApiOperation(value = "go类型制品库上传制品") @ApiOperation(value = "go类型制品库上传制品")
public AjaxResult uploadGoAsset(@PathVariable String enterpriseIdentifier, public AjaxResult uploadGoAsset(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName, @ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
@Valid @RequestBody ComponentRawInputVo componentRawInputVo) { @Valid @RequestBody ComponentRawInputVo componentRawInputVo) {
componentRawInputVo.setRepoName(repoName); componentRawInputVo.setRepoName(repoName);
componentRawInputVo.setEnterpriseIdentifier(enterpriseIdentifier); componentRawInputVo.setEnterpriseIdentifier(enterpriseIdentifier);
@ -238,7 +238,7 @@ public class PmsProductLibraryComponentController extends BaseController {
@PostMapping("/{repoName}/conda") @PostMapping("/{repoName}/conda")
@ApiOperation(value = "conda类型制品库上传制品") @ApiOperation(value = "conda类型制品库上传制品")
public AjaxResult uploadCondaAsset(@PathVariable String enterpriseIdentifier, public AjaxResult uploadCondaAsset(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName, @ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
@Valid @RequestBody ComponentRawInputVo componentRawInputVo) { @Valid @RequestBody ComponentRawInputVo componentRawInputVo) {
componentRawInputVo.setRepoName(repoName); componentRawInputVo.setRepoName(repoName);
componentRawInputVo.setEnterpriseIdentifier(enterpriseIdentifier); componentRawInputVo.setEnterpriseIdentifier(enterpriseIdentifier);
@ -254,7 +254,7 @@ public class PmsProductLibraryComponentController extends BaseController {
@PostMapping("/{repoName}/xxxxx") @PostMapping("/{repoName}/xxxxx")
@ApiOperation(value = "xxxxx类型制品库上传制品") @ApiOperation(value = "xxxxx类型制品库上传制品")
public AjaxResult uploadXxxxxAsset(@PathVariable String enterpriseIdentifier, public AjaxResult uploadXxxxxAsset(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName, @ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
@Valid @RequestBody ComponentRawInputVo componentRawInputVo) { @Valid @RequestBody ComponentRawInputVo componentRawInputVo) {
componentRawInputVo.setRepoName(repoName); componentRawInputVo.setRepoName(repoName);
componentRawInputVo.setEnterpriseIdentifier(enterpriseIdentifier); componentRawInputVo.setEnterpriseIdentifier(enterpriseIdentifier);

View File

@ -42,7 +42,7 @@ public class PmsProductLibraryController extends BaseController {
@GetMapping("/byRepoName/{repoName}") @GetMapping("/byRepoName/{repoName}")
@ApiOperation(value = "获取产品库详情") @ApiOperation(value = "获取产品库详情")
public GenericsAjaxResult<PmsProductLibraryRepositoriesDataVo> getByRepoName(@PathVariable String enterpriseIdentifier, 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)); return GenericsAjaxResult.success(pmsProductLibraryProductRepoService.selectPmsProductLibraryDataByName(enterpriseIdentifier, repoName));
} }
@ -54,7 +54,7 @@ public class PmsProductLibraryController extends BaseController {
@ApiOperation(value = "查询产品库列表") @ApiOperation(value = "查询产品库列表")
public GenericsTableDataInfo<PmsProductLibrarySimpleVo> list( public GenericsTableDataInfo<PmsProductLibrarySimpleVo> list(
@PathVariable String enterpriseIdentifier, @PathVariable String enterpriseIdentifier,
@ApiParam("模糊搜索产品库名称") String name) { @ApiParam("模糊搜索产品库标识") String name) {
startPage(); startPage();
return pmsProductLibraryProductRepoService.selectPmsProductLibraryPageList(enterpriseIdentifier, name); return pmsProductLibraryProductRepoService.selectPmsProductLibraryPageList(enterpriseIdentifier, name);
} }
@ -80,7 +80,7 @@ public class PmsProductLibraryController extends BaseController {
@PutMapping("/{name}") @PutMapping("/{name}")
@ApiOperation(value = "更新产品库") @ApiOperation(value = "更新产品库")
public AjaxResult editProduct(@PathVariable String enterpriseIdentifier, public AjaxResult editProduct(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "产品库名称", required = true) @PathVariable String name, @ApiParam(value = "产品库标识", required = true) @PathVariable String name,
@Valid @RequestBody ProductRepositoriesOperateVo productRepositoriesOperateVo) { @Valid @RequestBody ProductRepositoriesOperateVo productRepositoriesOperateVo) {
productRepositoriesOperateVo.setEnterpriseIdentifier(enterpriseIdentifier); productRepositoriesOperateVo.setEnterpriseIdentifier(enterpriseIdentifier);
productRepositoriesOperateVo.setName(name); productRepositoriesOperateVo.setName(name);
@ -95,7 +95,7 @@ public class PmsProductLibraryController extends BaseController {
@DeleteMapping("/{name}") @DeleteMapping("/{name}")
@ApiOperation(value = "删除产品库") @ApiOperation(value = "删除产品库")
public AjaxResult remove(@PathVariable String enterpriseIdentifier, 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)); return toAjax(pmsProductLibraryProductRepoService.deletePmsProductLibraryByName(enterpriseIdentifier, name));
} }
@ -108,7 +108,7 @@ public class PmsProductLibraryController extends BaseController {
@PostMapping("/{name}") @PostMapping("/{name}")
@ApiOperation(value = "上传产品库制品") @ApiOperation(value = "上传产品库制品")
public AjaxResult uploadProductAsset(@PathVariable String enterpriseIdentifier, public AjaxResult uploadProductAsset(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "产品库名称", required = true) @PathVariable String name, @ApiParam(value = "产品库标识", required = true) @PathVariable String name,
@Valid @RequestBody ComponentRawInputVo componentRawInputVo) { @Valid @RequestBody ComponentRawInputVo componentRawInputVo) {
componentRawInputVo.setRepoName(name); componentRawInputVo.setRepoName(name);
componentRawInputVo.setEnterpriseIdentifier(enterpriseIdentifier); componentRawInputVo.setEnterpriseIdentifier(enterpriseIdentifier);
@ -123,7 +123,7 @@ public class PmsProductLibraryController extends BaseController {
@GetMapping("/{repoName}/component/list") @GetMapping("/{repoName}/component/list")
@ApiOperation(value = "产品库查询制品列表") @ApiOperation(value = "产品库查询制品列表")
public AjaxResult list(@PathVariable String enterpriseIdentifier, public AjaxResult list(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "产品库名称", required = true) @PathVariable String repoName, @ApiParam(value = "产品库标识", required = true) @PathVariable String repoName,
@Valid ComponentSearchVo componentSearchVo) { @Valid ComponentSearchVo componentSearchVo) {
componentSearchVo.setRepositoryName(repoName); componentSearchVo.setRepositoryName(repoName);
NexusComponentResultVo<List<NexusResultDataVo>> result = NexusComponentResultVo<List<NexusResultDataVo>> result =
@ -138,7 +138,7 @@ public class PmsProductLibraryController extends BaseController {
@GetMapping(value = "/{repoName}/component/readAsset/{assetId}") @GetMapping(value = "/{repoName}/component/readAsset/{assetId}")
@ApiOperation(value = "产品库获取制品文件详细信息") @ApiOperation(value = "产品库获取制品文件详细信息")
public AjaxResult getAssetDetail(@PathVariable String enterpriseIdentifier, 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) { @PathVariable("assetId") String assetId) {
NexusComponentResultVo<NexusAssetResultDataVo> result = NexusComponentResultVo<NexusAssetResultDataVo> result =
pmsProductLibraryComponentService.getAssetDetailByAssetId(enterpriseIdentifier, repoName, null, assetId, true); pmsProductLibraryComponentService.getAssetDetailByAssetId(enterpriseIdentifier, repoName, null, assetId, true);
@ -152,7 +152,7 @@ public class PmsProductLibraryController extends BaseController {
@GetMapping(value = "/{repoName}/component/readComponent/{componentId}") @GetMapping(value = "/{repoName}/component/readComponent/{componentId}")
@ApiOperation(value = "产品库获取制品详细信息") @ApiOperation(value = "产品库获取制品详细信息")
public AjaxResult getComponentDetail(@PathVariable String enterpriseIdentifier, 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) { @PathVariable("componentId") String componentId) {
NexusComponentResultVo<NexusComponentResultDataVo> result = NexusComponentResultVo<NexusComponentResultDataVo> result =
pmsProductLibraryComponentService.getComponentDetailByComponentId(enterpriseIdentifier, repoName, null, componentId, true); pmsProductLibraryComponentService.getComponentDetailByComponentId(enterpriseIdentifier, repoName, null, componentId, true);
@ -165,7 +165,7 @@ public class PmsProductLibraryController extends BaseController {
@GetMapping("/{repoName}/component/canDeleteFolder") @GetMapping("/{repoName}/component/canDeleteFolder")
@ApiOperation(value = "产品库获取制品文件夹是否能删除的状态") @ApiOperation(value = "产品库获取制品文件夹是否能删除的状态")
public AjaxResult canDeleteFolder(@PathVariable String enterpriseIdentifier, public AjaxResult canDeleteFolder(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "产品库名称", required = true) @PathVariable String repoName, @ApiParam(value = "产品库标识", required = true) @PathVariable String repoName,
@Valid ComponentSearchVo componentSearchVo) { @Valid ComponentSearchVo componentSearchVo) {
componentSearchVo.setRepositoryName(repoName); componentSearchVo.setRepositoryName(repoName);
NexusComponentResultVo<Boolean> result = NexusComponentResultVo<Boolean> result =
@ -179,7 +179,7 @@ public class PmsProductLibraryController extends BaseController {
@GetMapping("/{repoName}/component/canDeleteComponent/{componentId}") @GetMapping("/{repoName}/component/canDeleteComponent/{componentId}")
@ApiOperation(value = "产品库获取制品是否能删除的状态") @ApiOperation(value = "产品库获取制品是否能删除的状态")
public AjaxResult canDeleteComponent(@PathVariable String enterpriseIdentifier, 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) { @PathVariable("componentId") String componentId) {
NexusComponentResultVo<Boolean> result = NexusComponentResultVo<Boolean> result =
pmsProductLibraryComponentService.getCanDeleteComponentByComponentId(enterpriseIdentifier, repoName, null, componentId, true); pmsProductLibraryComponentService.getCanDeleteComponentByComponentId(enterpriseIdentifier, repoName, null, componentId, true);
@ -192,7 +192,7 @@ public class PmsProductLibraryController extends BaseController {
@GetMapping("/{repoName}/component/canDeleteAsset/{assetId}") @GetMapping("/{repoName}/component/canDeleteAsset/{assetId}")
@ApiOperation(value = "产品库获取制品文件是否能删除的状态") @ApiOperation(value = "产品库获取制品文件是否能删除的状态")
public AjaxResult canDeleteAsset(@PathVariable String enterpriseIdentifier, 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) { @PathVariable("assetId") String assetId) {
NexusComponentResultVo<Boolean> result = NexusComponentResultVo<Boolean> result =
pmsProductLibraryComponentService.getCanDeleteAssetByAssetId(enterpriseIdentifier, repoName, null, assetId, true); pmsProductLibraryComponentService.getCanDeleteAssetByAssetId(enterpriseIdentifier, repoName, null, assetId, true);
@ -205,7 +205,7 @@ public class PmsProductLibraryController extends BaseController {
@DeleteMapping("/{repoName}/component/deleteAsset/{assetId}") @DeleteMapping("/{repoName}/component/deleteAsset/{assetId}")
@ApiOperation(value = "产品库删除制品文件") @ApiOperation(value = "产品库删除制品文件")
public AjaxResult deleteAsset(@PathVariable String enterpriseIdentifier, 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) { @PathVariable("assetId") String assetId) {
NexusComponentResultVo<List<String>> result = NexusComponentResultVo<List<String>> result =
pmsProductLibraryComponentService.deleteAssetByAssetId(enterpriseIdentifier, repoName, null, assetId, true); pmsProductLibraryComponentService.deleteAssetByAssetId(enterpriseIdentifier, repoName, null, assetId, true);
@ -218,7 +218,7 @@ public class PmsProductLibraryController extends BaseController {
@DeleteMapping("/{repoName}/component/deleteComponent/{componentId}") @DeleteMapping("/{repoName}/component/deleteComponent/{componentId}")
@ApiOperation(value = "产品库删除制品") @ApiOperation(value = "产品库删除制品")
public AjaxResult deleteComponent(@PathVariable String enterpriseIdentifier, 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) { @PathVariable("componentId") String componentId) {
NexusComponentResultVo<List<String>> result = NexusComponentResultVo<List<String>> result =
pmsProductLibraryComponentService.deleteComponentByComponentId(enterpriseIdentifier, repoName, null, componentId, true); pmsProductLibraryComponentService.deleteComponentByComponentId(enterpriseIdentifier, repoName, null, componentId, true);
@ -231,7 +231,7 @@ public class PmsProductLibraryController extends BaseController {
@DeleteMapping("/{repoName}/component/deleteFolder") @DeleteMapping("/{repoName}/component/deleteFolder")
@ApiOperation(value = "产品库异步删除制品文件夹") @ApiOperation(value = "产品库异步删除制品文件夹")
public AjaxResult deleteFolder(@PathVariable String enterpriseIdentifier, 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) { @Valid ComponentSearchVo componentSearchVo) {
componentSearchVo.setRepositoryName(repoName); componentSearchVo.setRepositoryName(repoName);
NexusComponentResultVo<Object> result = NexusComponentResultVo<Object> result =
@ -246,8 +246,8 @@ public class PmsProductLibraryController extends BaseController {
@GetMapping("/{productRepoName}/{repoName}/keyComponent/list") @GetMapping("/{productRepoName}/{repoName}/keyComponent/list")
@ApiOperation(value = "制品库查询关键制品列表") @ApiOperation(value = "制品库查询关键制品列表")
public AjaxResult keyComponentList(@PathVariable String enterpriseIdentifier, public AjaxResult keyComponentList(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "产品库名称", required = true) @PathVariable("productRepoName") String productRepoName, @ApiParam(value = "产品库标识", required = true) @PathVariable("productRepoName") String productRepoName,
@ApiParam(value = "制品库名称", required = true) @PathVariable("repoName") String repoName, @ApiParam(value = "制品库标识", required = true) @PathVariable("repoName") String repoName,
@Valid ComponentSearchVo componentSearchVo) { @Valid ComponentSearchVo componentSearchVo) {
componentSearchVo.setRepositoryName(repoName); componentSearchVo.setRepositoryName(repoName);
componentSearchVo.setProductRepoName(productRepoName); componentSearchVo.setProductRepoName(productRepoName);
@ -264,8 +264,8 @@ public class PmsProductLibraryController extends BaseController {
@PostMapping("/{productRepoName}/commonAssetToProductRepo/{repoName}") @PostMapping("/{productRepoName}/commonAssetToProductRepo/{repoName}")
@ApiOperation(value = "选择普通制品移入产品库") @ApiOperation(value = "选择普通制品移入产品库")
public AjaxResult addCommonAssetToProductRepo(@PathVariable String enterpriseIdentifier, public AjaxResult addCommonAssetToProductRepo(@PathVariable String enterpriseIdentifier,
@ApiParam("产品库名称") @PathVariable String productRepoName, @ApiParam("产品库标识") @PathVariable String productRepoName,
@ApiParam("制品库名称") @PathVariable String repoName, @ApiParam("制品库标识") @PathVariable String repoName,
@Valid @RequestBody CommonAssetAddToProductRepoVo commonAssetAddToProductRepoVo) { @Valid @RequestBody CommonAssetAddToProductRepoVo commonAssetAddToProductRepoVo) {
commonAssetAddToProductRepoVo.setEnterpriseIdentifier(enterpriseIdentifier); commonAssetAddToProductRepoVo.setEnterpriseIdentifier(enterpriseIdentifier);
commonAssetAddToProductRepoVo.setProductRepoName(productRepoName); commonAssetAddToProductRepoVo.setProductRepoName(productRepoName);

View File

@ -82,6 +82,7 @@ public class PmsProductLibraryRepositoriesController extends BaseController {
} }
/** /**
*
* 新增制品库-仓库 * 新增制品库-仓库
*/ */
// @RequiresPermissions("pms:pmsProductLibraryRepositories:add") // @RequiresPermissions("pms:pmsProductLibraryRepositories:add")
@ -104,7 +105,7 @@ public class PmsProductLibraryRepositoriesController extends BaseController {
@PutMapping("/hosted/{format}/{name}") @PutMapping("/hosted/{format}/{name}")
@ApiOperation(value = "更新托管仓库") @ApiOperation(value = "更新托管仓库")
public AjaxResult editHosted(@PathVariable String enterpriseIdentifier, public AjaxResult editHosted(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable String name, @ApiParam(value = "制品库标识", required = true) @PathVariable String name,
@Valid @RequestBody HostedRepositoriesOperateVo hostedRepositoriesOperateVo) { @Valid @RequestBody HostedRepositoriesOperateVo hostedRepositoriesOperateVo) {
hostedRepositoriesOperateVo.setEnterpriseIdentifier(enterpriseIdentifier); hostedRepositoriesOperateVo.setEnterpriseIdentifier(enterpriseIdentifier);
hostedRepositoriesOperateVo.setName(name); hostedRepositoriesOperateVo.setName(name);
@ -119,7 +120,7 @@ public class PmsProductLibraryRepositoriesController extends BaseController {
@PutMapping("/group/{format}/{name}") @PutMapping("/group/{format}/{name}")
@ApiOperation(value = "更新虚拟仓库") @ApiOperation(value = "更新虚拟仓库")
public AjaxResult editGroup(@PathVariable String enterpriseIdentifier, public AjaxResult editGroup(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "虚拟仓库名称", required = true) @PathVariable String name, @ApiParam(value = "虚拟仓库标识", required = true) @PathVariable String name,
@Valid @RequestBody GroupRepositoriesOperateVo groupRepositoriesOperateVo) { @Valid @RequestBody GroupRepositoriesOperateVo groupRepositoriesOperateVo) {
groupRepositoriesOperateVo.setEnterpriseIdentifier(enterpriseIdentifier); groupRepositoriesOperateVo.setEnterpriseIdentifier(enterpriseIdentifier);
groupRepositoriesOperateVo.setName(name); groupRepositoriesOperateVo.setName(name);
@ -134,7 +135,7 @@ public class PmsProductLibraryRepositoriesController extends BaseController {
@DeleteMapping("/{name}") @DeleteMapping("/{name}")
@ApiOperation(value = "删除制品库") @ApiOperation(value = "删除制品库")
public AjaxResult remove(@PathVariable String enterpriseIdentifier, 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)); return toAjax(pmsProductLibraryRepositoriesService.deletePmsProductLibraryRepositoriesByName(enterpriseIdentifier, name));
} }

View File

@ -41,8 +41,8 @@ public class PmsProductLibrarySnapshotController extends BaseController {
@GetMapping("/byRepoName/{repoName}/{snapshotName}") @GetMapping("/byRepoName/{repoName}/{snapshotName}")
@ApiOperation(value = "获取快照库详情") @ApiOperation(value = "获取快照库详情")
public GenericsAjaxResult<PmsProductLibraryRepositoriesDataVo> getSnapshotByRepoName(@PathVariable String enterpriseIdentifier, public GenericsAjaxResult<PmsProductLibraryRepositoriesDataVo> getSnapshotByRepoName(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName, @ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
@ApiParam(value = "快照库名称", required = true) @PathVariable String snapshotName) { @ApiParam(value = "快照库标识", required = true) @PathVariable String snapshotName) {
return GenericsAjaxResult.success(pmsProductLibrarySnapshotRepoService.selectPmsProductLibrarySnapshotDataByName(enterpriseIdentifier, repoName, snapshotName)); return GenericsAjaxResult.success(pmsProductLibrarySnapshotRepoService.selectPmsProductLibrarySnapshotDataByName(enterpriseIdentifier, repoName, snapshotName));
} }
@ -54,8 +54,8 @@ public class PmsProductLibrarySnapshotController extends BaseController {
@ApiOperation(value = "查询快照库列表") @ApiOperation(value = "查询快照库列表")
public GenericsTableDataInfo<PmsProductLibrarySnapshotSimpleVo> list( public GenericsTableDataInfo<PmsProductLibrarySnapshotSimpleVo> list(
@PathVariable String enterpriseIdentifier, @PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName, @ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
@ApiParam("模糊搜索快照库名称") String snapshotName) { @ApiParam("模糊搜索快照库标识") String snapshotName) {
startPage(); startPage();
return pmsProductLibrarySnapshotRepoService.selectPmsProductLibrarySnapshotPageList(enterpriseIdentifier, repoName, snapshotName); return pmsProductLibrarySnapshotRepoService.selectPmsProductLibrarySnapshotPageList(enterpriseIdentifier, repoName, snapshotName);
} }
@ -68,7 +68,7 @@ public class PmsProductLibrarySnapshotController extends BaseController {
@PostMapping("/{repoName}") @PostMapping("/{repoName}")
@ApiOperation(value = "新增快照库") @ApiOperation(value = "新增快照库")
public AjaxResult addSnapshot(@PathVariable String enterpriseIdentifier, public AjaxResult addSnapshot(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName, @ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
@Valid @RequestBody ProductRepositoriesSnapshotInputVo productRepositoriesSnapshotInputVo) { @Valid @RequestBody ProductRepositoriesSnapshotInputVo productRepositoriesSnapshotInputVo) {
productRepositoriesSnapshotInputVo.setEnterpriseIdentifier(enterpriseIdentifier); productRepositoriesSnapshotInputVo.setEnterpriseIdentifier(enterpriseIdentifier);
productRepositoriesSnapshotInputVo.setRepoName(repoName); productRepositoriesSnapshotInputVo.setRepoName(repoName);
@ -83,8 +83,8 @@ public class PmsProductLibrarySnapshotController extends BaseController {
@DeleteMapping("/{repoName}/{snapshotName}") @DeleteMapping("/{repoName}/{snapshotName}")
@ApiOperation(value = "删除快照库") @ApiOperation(value = "删除快照库")
public AjaxResult remove(@PathVariable String enterpriseIdentifier, public AjaxResult remove(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName, @ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
@ApiParam(value = "快照库名称", required = true) @PathVariable String snapshotName) { @ApiParam(value = "快照库标识", required = true) @PathVariable String snapshotName) {
return toAjax(pmsProductLibrarySnapshotRepoService.deletePmsProductLibrarySnapshotRepoByName(enterpriseIdentifier, repoName, snapshotName)); return toAjax(pmsProductLibrarySnapshotRepoService.deletePmsProductLibrarySnapshotRepoByName(enterpriseIdentifier, repoName, snapshotName));
} }
@ -95,8 +95,8 @@ public class PmsProductLibrarySnapshotController extends BaseController {
@GetMapping("/{repoName}/{snapshotName}/component/list") @GetMapping("/{repoName}/{snapshotName}/component/list")
@ApiOperation(value = "快照库查询制品列表") @ApiOperation(value = "快照库查询制品列表")
public AjaxResult list(@PathVariable String enterpriseIdentifier, public AjaxResult list(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable String repoName, @ApiParam(value = "制品库标识", required = true) @PathVariable String repoName,
@ApiParam(value = "快照名称", required = true) @PathVariable String snapshotName, @ApiParam(value = "快照标识", required = true) @PathVariable String snapshotName,
@Valid ComponentSearchVo componentSearchVo) { @Valid ComponentSearchVo componentSearchVo) {
componentSearchVo.setRepositoryName(repoName); componentSearchVo.setRepositoryName(repoName);
componentSearchVo.setSnapshotRepoName(snapshotName); componentSearchVo.setSnapshotRepoName(snapshotName);
@ -112,8 +112,8 @@ public class PmsProductLibrarySnapshotController extends BaseController {
@GetMapping(value = "/{repoName}/{snapshotName}/component/readAsset/{assetId}") @GetMapping(value = "/{repoName}/{snapshotName}/component/readAsset/{assetId}")
@ApiOperation(value = "快照库获取制品文件详细信息") @ApiOperation(value = "快照库获取制品文件详细信息")
public AjaxResult getAssetDetail(@PathVariable String enterpriseIdentifier, public AjaxResult getAssetDetail(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable("repoName") String repoName, @ApiParam(value = "制品库标识", required = true) @PathVariable("repoName") String repoName,
@ApiParam(value = "快照名称", required = true) @PathVariable("snapshotName") String snapshotName, @ApiParam(value = "快照标识", required = true) @PathVariable("snapshotName") String snapshotName,
@PathVariable("assetId") String assetId) { @PathVariable("assetId") String assetId) {
NexusComponentResultVo<NexusAssetResultDataVo> result = NexusComponentResultVo<NexusAssetResultDataVo> result =
pmsProductLibraryComponentService.getAssetDetailByAssetId(enterpriseIdentifier, repoName, snapshotName, assetId, false); pmsProductLibraryComponentService.getAssetDetailByAssetId(enterpriseIdentifier, repoName, snapshotName, assetId, false);
@ -127,8 +127,8 @@ public class PmsProductLibrarySnapshotController extends BaseController {
@GetMapping(value = "/{repoName}/{snapshotName}/component/readComponent/{componentId}") @GetMapping(value = "/{repoName}/{snapshotName}/component/readComponent/{componentId}")
@ApiOperation(value = "快照库获取制品详细信息") @ApiOperation(value = "快照库获取制品详细信息")
public AjaxResult getComponentDetail(@PathVariable String enterpriseIdentifier, public AjaxResult getComponentDetail(@PathVariable String enterpriseIdentifier,
@ApiParam(value = "制品库名称", required = true) @PathVariable("repoName") String repoName, @ApiParam(value = "制品库标识", required = true) @PathVariable("repoName") String repoName,
@ApiParam(value = "快照名称", required = true) @PathVariable("snapshotName") String snapshotName, @ApiParam(value = "快照标识", required = true) @PathVariable("snapshotName") String snapshotName,
@PathVariable("componentId") String componentId) { @PathVariable("componentId") String componentId) {
NexusComponentResultVo<NexusComponentResultDataVo> result = NexusComponentResultVo<NexusComponentResultDataVo> result =
pmsProductLibraryComponentService.getComponentDetailByComponentId(enterpriseIdentifier, repoName, snapshotName, componentId, false); pmsProductLibraryComponentService.getComponentDetailByComponentId(enterpriseIdentifier, repoName, snapshotName, componentId, false);

View File

@ -91,7 +91,7 @@ public class PmsProductLibraryRepositories extends BaseEntity {
/** /**
* 预留字段2 * 预留字段2
*/ */
@ApiModelProperty(value = "快照名称") @ApiModelProperty(value = "快照标识")
private String snapshotName; private String snapshotName;
public PmsProductLibraryRepositoriesDataVo toPmsProductLibraryRepositoriesDataVo() { 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) { public static String getNexusProductRepositoriesName(String enterpriseIdentifier, String name) {
return String.format("product-%s-%s", enterpriseIdentifier, 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) { public static String getNexusSnapshotRepositoriesName(String enterpriseIdentifier, String repoName, String snapshotName) {
return String.format("snapshot-%s-%s-%s", enterpriseIdentifier, repoName, 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) { public static String getNexusRepositoriesName(String enterpriseIdentifier, String name) {
return String.format("%s-%s", enterpriseIdentifier, name); return String.format("%s-%s", enterpriseIdentifier, name);

View File

@ -19,9 +19,9 @@ public class CommonAssetAddToProductRepoVo {
@ApiModelProperty(value = "制品Id列表") @ApiModelProperty(value = "制品Id列表")
@Size(min = 1, message = "制品Id列表不能为空") @Size(min = 1, message = "制品Id列表不能为空")
private List<String> assetIdList; private List<String> assetIdList;
@ApiModelProperty(value = "制品库名称", hidden = true) @ApiModelProperty(value = "制品库标识", hidden = true)
private String productRepoName; private String productRepoName;
@ApiModelProperty(value = "制品库名称", hidden = true) @ApiModelProperty(value = "制品库标识", hidden = true)
private String repoName; private String repoName;
@ApiModelProperty(value = "组织标识", hidden = true) @ApiModelProperty(value = "组织标识", hidden = true)
private String enterpriseIdentifier; private String enterpriseIdentifier;

View File

@ -18,9 +18,9 @@ import javax.validation.constraints.NotNull;
@Data @Data
@ApiModel("制品通用输入对象") @ApiModel("制品通用输入对象")
public class ComponentInputVo { public class ComponentInputVo {
@ApiModelProperty(value = "制品库名称", hidden = true) @ApiModelProperty(value = "制品库标识", hidden = true)
private String repoName; private String repoName;
@ApiModelProperty(value = "快照库名称", hidden = true) @ApiModelProperty(value = "快照库标识", hidden = true)
private String snapshotName; private String snapshotName;
@ApiModelProperty(value = "组织标识", hidden = true) @ApiModelProperty(value = "组织标识", hidden = true)
private String enterpriseIdentifier; private String enterpriseIdentifier;

View File

@ -21,9 +21,9 @@ import java.util.List;
@Data @Data
@ApiModel("制品Maven输入对象") @ApiModel("制品Maven输入对象")
public class ComponentMavenInputVo { public class ComponentMavenInputVo {
@ApiModelProperty(value = "制品库名称", hidden = true) @ApiModelProperty(value = "制品库标识", hidden = true)
private String repoName; private String repoName;
@ApiModelProperty(value = "快照库名称", hidden = true) @ApiModelProperty(value = "快照库标识", hidden = true)
private String snapshotName; private String snapshotName;
@ApiModelProperty(value = "组织标识", hidden = true) @ApiModelProperty(value = "组织标识", hidden = true)
private String enterpriseIdentifier; private String enterpriseIdentifier;

View File

@ -25,9 +25,9 @@ import java.util.List;
@Data @Data
@ApiModel("制品Raw输入对象") @ApiModel("制品Raw输入对象")
public class ComponentRawInputVo { public class ComponentRawInputVo {
@ApiModelProperty(value = "制品库名称", hidden = true) @ApiModelProperty(value = "制品库标识", hidden = true)
private String repoName; private String repoName;
@ApiModelProperty(value = "快照库名称", hidden = true) @ApiModelProperty(value = "快照库标识", hidden = true)
private String snapshotName; private String snapshotName;
@ApiModelProperty(value = "组织标识", hidden = true) @ApiModelProperty(value = "组织标识", hidden = true)
private String enterpriseIdentifier; private String enterpriseIdentifier;

View File

@ -24,20 +24,20 @@ public class ComponentSearchVo {
private String node; private String node;
/** /**
* 制品库名称 * 制品库标识
*/ */
@ApiModelProperty(value = "制品库名称", hidden = true) @ApiModelProperty(value = "制品库标识", hidden = true)
private String repositoryName; private String repositoryName;
/** /**
* 快照库名称 * 快照库标识
*/ */
@ApiModelProperty(value = "快照库名称", hidden = true) @ApiModelProperty(value = "快照库标识", hidden = true)
private String snapshotRepoName; private String snapshotRepoName;
/** /**
* 产品库名称 * 产品库标识
*/ */
@ApiModelProperty(value = "产品库名称", hidden = true) @ApiModelProperty(value = "产品库标识", hidden = true)
private String productRepoName; private String productRepoName;
} }

View File

@ -43,14 +43,14 @@ public class NexusAssetResultDataVo {
@ApiModelProperty(value = "制品文件大小") @ApiModelProperty(value = "制品文件大小")
private int size; private int size;
/** /**
* 制品库名称 * 制品库标识
*/ */
@ApiModelProperty(value = "制品库名称") @ApiModelProperty(value = "制品库标识")
private String repositoryName; private String repositoryName;
/** /**
* 包含制品库名称 * 包含制品库标识
*/ */
@ApiModelProperty(value = "包含制品库名称") @ApiModelProperty(value = "包含制品库标识")
private String containingRepositoryName; private String containingRepositoryName;
/** /**
* 制品文件创建时间 * 制品文件创建时间

View File

@ -23,7 +23,7 @@ public class NexusAssetVo {
*/ */
private String id; private String id;
/** /**
* 制品库名称 * 制品库标识
*/ */
private String repository; private String repository;
/** /**

View File

@ -34,9 +34,9 @@ public class NexusComponentResultDataVo {
@ApiModelProperty(value = "制品所在组") @ApiModelProperty(value = "制品所在组")
private String group; private String group;
/** /**
* 制品库名称 * 制品库标识
*/ */
@ApiModelProperty(value = "制品库名称") @ApiModelProperty(value = "制品库标识")
private String repositoryName; private String repositoryName;
/** /**
* 制品版本 * 制品版本

View File

@ -19,7 +19,7 @@ public class NexusDockerComponentVo {
*/ */
private String name; private String name;
/** /**
* 制品库名称 * 制品库标识
*/ */
private String repository; private String repository;
/** /**

View File

@ -14,8 +14,8 @@ import lombok.Data;
@ApiModel("快照库简化对象") @ApiModel("快照库简化对象")
public class PmsProductLibrarySnapshotSimpleVo extends PmsProductLibrarySimpleVo { public class PmsProductLibrarySnapshotSimpleVo extends PmsProductLibrarySimpleVo {
/** /**
* 快照名称 * 快照标识
*/ */
@ApiModelProperty(value = "快照名称") @ApiModelProperty(value = "快照标识")
private String snapshotName; private String snapshotName;
} }

View File

@ -19,10 +19,10 @@ import javax.validation.constraints.Pattern;
@Data @Data
@ApiModel("快照库输入对象") @ApiModel("快照库输入对象")
public class ProductRepositoriesSnapshotInputVo { public class ProductRepositoriesSnapshotInputVo {
@ApiModelProperty(value = "快照库名称(非必填,未填将根据时分秒生成名称)") @ApiModelProperty(value = "快照库标识(非必填,未填将根据时分秒生成名称)")
@Pattern(regexp = "^[A-Za-z0-9](?!_)(?!\\.)[A-Za-z0-9_\\-.]*$", message = "快照库名称不符合规范") @Pattern(regexp = "^[A-Za-z0-9](?!_)(?!\\.)[A-Za-z0-9_\\-.]*$", message = "快照库标识不符合规范")
private String name; private String name;
@ApiModelProperty(value = "制品库名称", hidden = true) @ApiModelProperty(value = "制品库标识", hidden = true)
private String repoName; private String repoName;
@ApiModelProperty(value = "关联企业标识", hidden = true) @ApiModelProperty(value = "关联企业标识", hidden = true)
private String enterpriseIdentifier; private String enterpriseIdentifier;

View File

@ -63,10 +63,10 @@ public interface PmsProductLibraryComponentMapper {
public int deletePmsProductLibraryComponentByIds(Long[] ids); public int deletePmsProductLibraryComponentByIds(Long[] ids);
/** /**
* 在组织下根据制品库名称和制品文件名称查找制品文件 * 在组织下根据制品库标识和制品文件名称查找制品文件
* *
* @param name 制品文件名称 * @param name 制品文件名称
* @param repoId 制品库名称 * @param repoId 制品库id
* @param pmsEnterpriseId 组织Id * @param pmsEnterpriseId 组织Id
* @return 制品文件 * @return 制品文件
*/ */
@ -84,7 +84,7 @@ public interface PmsProductLibraryComponentMapper {
* 查询对应路径下制品文件列表 * 查询对应路径下制品文件列表
* *
* @param path 路径 * @param path 路径
* @param repoId 制品库名称 * @param repoId 制品库id
* @param pmsEnterpriseId 组织Id * @param pmsEnterpriseId 组织Id
* @return 制品文件列表 * @return 制品文件列表
*/ */

View File

@ -65,7 +65,7 @@ public interface PmsProductLibraryRepositoriesMapper {
/** /**
* 根据名称查找制品库 * 根据名称查找制品库
* *
* @param name 制品库名称 * @param name 制品库标识
* @param pmsEnterpriseIdentifier 企业标识 * @param pmsEnterpriseIdentifier 企业标识
* @param format 制品格式 * @param format 制品格式
* @return 制品库数量 * @return 制品库数量
@ -75,36 +75,47 @@ public interface PmsProductLibraryRepositoriesMapper {
/** /**
* 根据名称查找快照库数量 * 根据名称查找快照库数量
* *
* @param repoName 制品库名称 * @param repoName 制品库标识
* @param snapshotName 快照库名称 * @param snapshotName 快照库标识
* @param pmsEnterpriseIdentifier 企业标识 * @param pmsEnterpriseIdentifier 企业标识
* @return 快照库数量 * @return 快照库数量
*/ */
Integer selectRepositoriesSnapshotBySnapshotNameCount(@Param("pmsEnterpriseIdentifier") String pmsEnterpriseIdentifier, @Param("repoName") String repoName, @Param("snapshotName") String snapshotName); 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 pmsEnterpriseIdentifier 企业标识
* @param name 制品库名称 * @param name 制品库标识
* @return 制品库 * @return 制品库
*/ */
PmsProductLibraryRepositories selectPmsProductLibraryRepositoriesByName(@Param("pmsEnterpriseIdentifier") String pmsEnterpriseIdentifier, @Param("name") String name); PmsProductLibraryRepositories selectPmsProductLibraryRepositoriesByName(@Param("pmsEnterpriseIdentifier") String pmsEnterpriseIdentifier, @Param("name") String name);
/** /**
* 根据产品库名称查找产品库 * 根据产品库标识查找产品库
* *
* @param pmsEnterpriseIdentifier 企业标识 * @param pmsEnterpriseIdentifier 企业标识
* @param name 产品库名称 * @param name 产品库标识
* @return 产品库 * @return 产品库
*/ */
PmsProductLibraryRepositories selectPmsProductLibraryByName(@Param("pmsEnterpriseIdentifier") String pmsEnterpriseIdentifier, @Param("name") String name); PmsProductLibraryRepositories selectPmsProductLibraryByName(@Param("pmsEnterpriseIdentifier") String pmsEnterpriseIdentifier, @Param("name") String name);
/** /**
* 根据制品库名称以及快照库名称查找快照库 * 根据制品库标识以及快照库标识查找快照库
* *
* @param pmsEnterpriseIdentifier 企业标识 * @param pmsEnterpriseIdentifier 企业标识
* @param repoName 制品库名称 * @param repoName 制品库标识
* @param snapshotName 快照库名称 * @param snapshotName 快照库标识
* @return 快照库 * @return 快照库
*/ */
PmsProductLibraryRepositories selectPmsProductLibrarySnapshotByName(@Param("pmsEnterpriseIdentifier") String pmsEnterpriseIdentifier, @Param("repoName") String repoName, @Param("snapshotName") String snapshotName); PmsProductLibraryRepositories selectPmsProductLibrarySnapshotByName(@Param("pmsEnterpriseIdentifier") String pmsEnterpriseIdentifier, @Param("repoName") String repoName, @Param("snapshotName") String snapshotName);
@ -112,7 +123,7 @@ public interface PmsProductLibraryRepositoriesMapper {
* 查询产品库列表 * 查询产品库列表
* *
* @param pmsEnterpriseIdentifier 企业标识 * @param pmsEnterpriseIdentifier 企业标识
* @param name 产品库名称 * @param name 产品库标识
* @return 产品库列表 * @return 产品库列表
*/ */
List<PmsProductLibraryRepositories> selectPmsProductLibraryList(@Param("pmsEnterpriseIdentifier") String pmsEnterpriseIdentifier, @Param("name") String name); List<PmsProductLibraryRepositories> selectPmsProductLibraryList(@Param("pmsEnterpriseIdentifier") String pmsEnterpriseIdentifier, @Param("name") String name);

View File

@ -64,7 +64,7 @@ public interface IPmsProductLibraryComponentService {
* 获取制品文件详情 * 获取制品文件详情
* *
* @param enterpriseIdentifier 企业标识 * @param enterpriseIdentifier 企业标识
* @param repoName 制品库名称 * @param repoName 制品库标识
* @param assetId 制品文件标识 * @param assetId 制品文件标识
* @param isProduct 是否产品库 * @param isProduct 是否产品库
* @return 制品文件详情 * @return 制品文件详情
@ -75,7 +75,7 @@ public interface IPmsProductLibraryComponentService {
* 获取制品详情 * 获取制品详情
* *
* @param enterpriseIdentifier 企业标识 * @param enterpriseIdentifier 企业标识
* @param repoName 制品库名称 * @param repoName 制品库标识
* @param componentId 制品标识 * @param componentId 制品标识
* @param isProduct 是否产品库 * @param isProduct 是否产品库
* @return 制品详情 * @return 制品详情
@ -100,7 +100,7 @@ public interface IPmsProductLibraryComponentService {
* 删除制品 * 删除制品
* *
* @param enterpriseIdentifier 企业标识 * @param enterpriseIdentifier 企业标识
* @param repoName 制品库名称 * @param repoName 制品库标识
* @param snapshotName * @param snapshotName
* @param assetId 制品文件 * @param assetId 制品文件
* @param isProduct 是否产品库 * @param isProduct 是否产品库

View File

@ -17,7 +17,7 @@ public interface IPmsProductLibraryProductRepoService {
* 根据组织标识和名称查找产品库 * 根据组织标识和名称查找产品库
* *
* @param enterpriseIdentifier 组织标识 * @param enterpriseIdentifier 组织标识
* @param repoName 产品库名称 * @param repoName 产品库标识
* @return 产品库 * @return 产品库
*/ */
PmsProductLibraryRepositories selectPmsProductLibraryByName(String enterpriseIdentifier, String repoName); PmsProductLibraryRepositories selectPmsProductLibraryByName(String enterpriseIdentifier, String repoName);
@ -27,7 +27,7 @@ public interface IPmsProductLibraryProductRepoService {
* 查询产品库列表 * 查询产品库列表
* *
* @param enterpriseIdentifier 企业标识 * @param enterpriseIdentifier 企业标识
* @param name 产品库名称 * @param name 产品库标识
* @return 产品库列表 * @return 产品库列表
*/ */
GenericsTableDataInfo<PmsProductLibrarySimpleVo> selectPmsProductLibraryPageList(String enterpriseIdentifier, String name); GenericsTableDataInfo<PmsProductLibrarySimpleVo> selectPmsProductLibraryPageList(String enterpriseIdentifier, String name);
@ -53,7 +53,7 @@ public interface IPmsProductLibraryProductRepoService {
* 删除产品库 * 删除产品库
* *
* @param enterpriseIdentifier 组织标识 * @param enterpriseIdentifier 组织标识
* @param name 产品库名称 * @param name 产品库标识
* @return 产品库 * @return 产品库
*/ */
int deletePmsProductLibraryByName(String enterpriseIdentifier, String name); int deletePmsProductLibraryByName(String enterpriseIdentifier, String name);

View File

@ -34,7 +34,7 @@ public interface IPmsProductLibraryRepositoriesService {
* 查询制品仓库分页列表 * 查询制品仓库分页列表
* *
* @param enterpriseIdentifier 企业表示 * @param enterpriseIdentifier 企业表示
* @param searchVo 搜索制品库名称 * @param searchVo 搜索制品库标识
* @return 制品仓库分页列表 * @return 制品仓库分页列表
*/ */
GenericsTableDataInfo<PmsProductLibraryRepositoriesSimpleVo> selectPmsProductLibraryRepositoriesPageList(String enterpriseIdentifier, PmsProductLibraryRepositoriesSearchVo searchVo); GenericsTableDataInfo<PmsProductLibraryRepositoriesSimpleVo> selectPmsProductLibraryRepositoriesPageList(String enterpriseIdentifier, PmsProductLibraryRepositoriesSearchVo searchVo);
@ -71,16 +71,16 @@ public interface IPmsProductLibraryRepositoriesService {
* 通过名称删除制品库 * 通过名称删除制品库
* *
* @param enterpriseIdentifier 组织标识 * @param enterpriseIdentifier 组织标识
* @param name 制品库名称 * @param name 制品库标识
* @return 删除结果 * @return 删除结果
*/ */
int deletePmsProductLibraryRepositoriesByName(String enterpriseIdentifier, String name); int deletePmsProductLibraryRepositoriesByName(String enterpriseIdentifier, String name);
/** /**
* 根据组织标识和制品库名称查找制品库 * 根据组织标识和制品库标识查找制品库
* *
* @param enterpriseIdentifier 组织标识 * @param enterpriseIdentifier 组织标识
* @param repoName 制品库名称 * @param repoName 制品库标识
* @return 制品库 * @return 制品库
*/ */
PmsProductLibraryRepositories selectPmsProductLibraryRepositoriesByName(String enterpriseIdentifier, String repoName); PmsProductLibraryRepositories selectPmsProductLibraryRepositoriesByName(String enterpriseIdentifier, String repoName);
@ -102,10 +102,10 @@ public interface IPmsProductLibraryRepositoriesService {
int updateGroupPmsProductLibraryRepositories(GroupRepositoriesOperateVo groupRepositoriesOperateVo); int updateGroupPmsProductLibraryRepositories(GroupRepositoriesOperateVo groupRepositoriesOperateVo);
/** /**
* 根据制品库名称获取制品库详情 * 根据制品库标识获取制品库详情
* *
* @param enterpriseIdentifier 组织标识 * @param enterpriseIdentifier 组织标识
* @param repoName 制品库名称 * @param repoName 制品库标识
* @return 制品库详情 * @return 制品库详情
*/ */
PmsProductLibraryRepositoriesDataVo selectPmsProductLibraryRepositoriesDataByName(String enterpriseIdentifier, String repoName); PmsProductLibraryRepositoriesDataVo selectPmsProductLibraryRepositoriesDataByName(String enterpriseIdentifier, String repoName);

View File

@ -388,7 +388,7 @@ public class PmsProductLibraryComponentServiceImpl implements IPmsProductLibrary
); );
pmsProductLibraryRepositoriesService.checkLockRepositoryStatus(repo.getPmsEnterpriseIdentifier(), repo.getId()); pmsProductLibraryRepositoriesService.checkLockRepositoryStatus(repo.getPmsEnterpriseIdentifier(), repo.getId());
if (!ProductLibraryRepositoriesFormatEnum.MAVEN.getKey().equals(repo.getFormat())) { if (!ProductLibraryRepositoriesFormatEnum.MAVEN.getKey().equals(repo.getFormat())) {
throw new ServiceException("该制品库非Maven格式无法上传(制品库名称[%s])", repo.getName()); throw new ServiceException("该制品库非Maven格式无法上传(制品库标识[%s])", repo.getName());
} }
// 创建一个MultipartEntityBuilder // 创建一个MultipartEntityBuilder
MultipartEntityBuilder builder = MultipartEntityBuilder MultipartEntityBuilder builder = MultipartEntityBuilder
@ -458,7 +458,7 @@ public class PmsProductLibraryComponentServiceImpl implements IPmsProductLibrary
pmsProductLibraryRepositoriesService.checkLockRepositoryStatus(repo.getPmsEnterpriseIdentifier(), repo.getId()); pmsProductLibraryRepositoriesService.checkLockRepositoryStatus(repo.getPmsEnterpriseIdentifier(), repo.getId());
if (!componentRawInputVo.getFormat().equals(repo.getFormat())) { 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
MultipartEntityBuilder builder = MultipartEntityBuilder MultipartEntityBuilder builder = MultipartEntityBuilder
@ -514,7 +514,7 @@ public class PmsProductLibraryComponentServiceImpl implements IPmsProductLibrary
); );
pmsProductLibraryRepositoriesService.checkLockRepositoryStatus(repo.getPmsEnterpriseIdentifier(), repo.getId()); pmsProductLibraryRepositoriesService.checkLockRepositoryStatus(repo.getPmsEnterpriseIdentifier(), repo.getId());
if (!ProductLibraryRepositoriesFormatEnum.NPM.getKey().equals(repo.getFormat())) { if (!ProductLibraryRepositoriesFormatEnum.NPM.getKey().equals(repo.getFormat())) {
throw new ServiceException("该制品库非Npm格式无法上传(制品库名称[%s])", repo.getName()); throw new ServiceException("该制品库非Npm格式无法上传(制品库标识[%s])", repo.getName());
} }
// 创建一个MultipartEntityBuilder // 创建一个MultipartEntityBuilder
MultipartEntityBuilder builder = MultipartEntityBuilder MultipartEntityBuilder builder = MultipartEntityBuilder
@ -553,7 +553,7 @@ public class PmsProductLibraryComponentServiceImpl implements IPmsProductLibrary
componentInputVo.getSnapshotName()); componentInputVo.getSnapshotName());
pmsProductLibraryRepositoriesService.checkLockRepositoryStatus(repo.getPmsEnterpriseIdentifier(), repo.getId()); pmsProductLibraryRepositoriesService.checkLockRepositoryStatus(repo.getPmsEnterpriseIdentifier(), repo.getId());
if (!ProductLibraryRepositoriesFormatEnum.PYPI.getKey().equals(repo.getFormat())) { if (!ProductLibraryRepositoriesFormatEnum.PYPI.getKey().equals(repo.getFormat())) {
throw new ServiceException("该制品库非Pypi格式无法上传(制品库名称[%s])", repo.getName()); throw new ServiceException("该制品库非Pypi格式无法上传(制品库标识[%s])", repo.getName());
} }
// 创建一个MultipartEntityBuilder // 创建一个MultipartEntityBuilder
MultipartEntityBuilder builder = MultipartEntityBuilder MultipartEntityBuilder builder = MultipartEntityBuilder

View File

@ -63,7 +63,7 @@ public class PmsProductLibraryProductRepoServiceImpl implements IPmsProductLibra
PmsProductLibraryRepositories pmsProductLibraryRepositories = PmsProductLibraryRepositories pmsProductLibraryRepositories =
pmsProductLibraryRepositoriesMapper.selectPmsProductLibraryByName(enterpriseIdentifier, name); pmsProductLibraryRepositoriesMapper.selectPmsProductLibraryByName(enterpriseIdentifier, name);
if (pmsProductLibraryRepositories == null) { if (pmsProductLibraryRepositories == null) {
throw new ServiceException("组织下不存在该产品库(组织标识[%s],产品库名称[%s])", enterpriseIdentifier, name); throw new ServiceException("组织下不存在该产品库(组织标识[%s],产品库标识[%s])", enterpriseIdentifier, name);
} }
return pmsProductLibraryRepositories; return pmsProductLibraryRepositories;
} }
@ -103,11 +103,11 @@ public class PmsProductLibraryProductRepoServiceImpl implements IPmsProductLibra
@Override @Override
public int insertPmsProductLibrary(ProductRepositoriesInputVo productRepositoriesInputVo) { public int insertPmsProductLibrary(ProductRepositoriesInputVo productRepositoriesInputVo) {
PmsEnterprise pmsEnterprise = pmsEnterpriseService.selectPmsEnterpriseByIdentifier(productRepositoriesInputVo.getEnterpriseIdentifier()); PmsEnterprise pmsEnterprise = pmsEnterpriseService.selectPmsEnterpriseByIdentifier(productRepositoriesInputVo.getEnterpriseIdentifier());
// 校验制品库名称 // 校验制品库标识
Integer count = pmsProductLibraryRepositoriesMapper.selectPmsProductLibraryRepositoriesByNameCount( Integer count = pmsProductLibraryRepositoriesMapper.selectPmsProductLibraryRepositoriesByNameCount(
productRepositoriesInputVo.getName(), productRepositoriesInputVo.getEnterpriseIdentifier(), productRepositoriesInputVo.getFormat()); productRepositoriesInputVo.getName(), productRepositoriesInputVo.getEnterpriseIdentifier(), productRepositoriesInputVo.getFormat());
if (count > 0) { if (count > 0) {
throw new ServiceException("该产品库名称在当前企业下已存在(产品库名称[%s])", productRepositoriesInputVo.getName()); throw new ServiceException("该产品库标识在当前企业下已存在(产品库标识[%s])", productRepositoriesInputVo.getName());
} }
NexusHostedRepoInputVo requestBody = productRepositoriesInputVo.toNexusRepoDataVo(); NexusHostedRepoInputVo requestBody = productRepositoriesInputVo.toNexusRepoDataVo();

View File

@ -45,7 +45,7 @@ public class PmsProductLibraryRepositoriesServiceImpl implements IPmsProductLibr
PmsProductLibraryRepositories pmsProductLibraryRepositories = PmsProductLibraryRepositories pmsProductLibraryRepositories =
pmsProductLibraryRepositoriesMapper.selectPmsProductLibraryRepositoriesByName(enterpriseIdentifier, name); pmsProductLibraryRepositoriesMapper.selectPmsProductLibraryRepositoriesByName(enterpriseIdentifier, name);
if (pmsProductLibraryRepositories == null) { if (pmsProductLibraryRepositories == null) {
throw new ServiceException("组织下不存在该制品库(组织标识[%s],制品库名称[%s])", enterpriseIdentifier, name); throw new ServiceException("组织下不存在该制品库(组织标识[%s],制品库标识[%s])", enterpriseIdentifier, name);
} }
return pmsProductLibraryRepositories; return pmsProductLibraryRepositories;
} }
@ -56,7 +56,7 @@ public class PmsProductLibraryRepositoriesServiceImpl implements IPmsProductLibr
NexusRequestUrl.GET_REPOSITORIES(type, format, nexusRepoName), NexusRequestUrl.GET_REPOSITORIES(type, format, nexusRepoName),
NexusHostedRepoInputVo.class); NexusHostedRepoInputVo.class);
if (nexusRepo == null) { if (nexusRepo == null) {
throw new ServiceException("该Nexus制品库不存在(制品库名称[%s])", nexusRepoName); throw new ServiceException("该Nexus制品库不存在(制品库标识[%s])", nexusRepoName);
} }
return nexusRepo; return nexusRepo;
} }
@ -80,11 +80,11 @@ public class PmsProductLibraryRepositoriesServiceImpl implements IPmsProductLibr
@Override @Override
public int insertGroupPmsProductLibraryRepositories(GroupRepositoriesInputVo groupRepositoriesInputVo) { public int insertGroupPmsProductLibraryRepositories(GroupRepositoriesInputVo groupRepositoriesInputVo) {
PmsEnterprise pmsEnterprise = pmsEnterpriseService.selectPmsEnterpriseByIdentifier(groupRepositoriesInputVo.getEnterpriseIdentifier()); PmsEnterprise pmsEnterprise = pmsEnterpriseService.selectPmsEnterpriseByIdentifier(groupRepositoriesInputVo.getEnterpriseIdentifier());
// 校验制品库名称 // 校验制品库标识
Integer count = pmsProductLibraryRepositoriesMapper.selectPmsProductLibraryRepositoriesByNameCount( Integer count = pmsProductLibraryRepositoriesMapper.selectPmsProductLibraryRepositoriesByNameCount(
groupRepositoriesInputVo.getName(), groupRepositoriesInputVo.getEnterpriseIdentifier(), groupRepositoriesInputVo.getFormat()); groupRepositoriesInputVo.getName(), groupRepositoriesInputVo.getEnterpriseIdentifier(), groupRepositoriesInputVo.getFormat());
if (count > 0) { if (count > 0) {
throw new ServiceException("该制品库名称在当前企业下已存在(制品库名称[%s])", groupRepositoriesInputVo.getName()); throw new ServiceException("该制品库标识在当前企业下已存在(制品库标识[%s])", groupRepositoriesInputVo.getName());
} }
checkGroupMemberRepoList(groupRepositoriesInputVo); checkGroupMemberRepoList(groupRepositoriesInputVo);
NexusGroupRepoInputVo requestBody = groupRepositoriesInputVo.toNexusGroupRepoInputVo(); NexusGroupRepoInputVo requestBody = groupRepositoriesInputVo.toNexusGroupRepoInputVo();
@ -164,11 +164,17 @@ public class PmsProductLibraryRepositoriesServiceImpl implements IPmsProductLibr
@Override @Override
public int insertHostedPmsProductLibraryRepositories(HostedRepositoriesInputVo hostedPmsProductLibraryRepositoriesInputVo) { public int insertHostedPmsProductLibraryRepositories(HostedRepositoriesInputVo hostedPmsProductLibraryRepositoriesInputVo) {
PmsEnterprise pmsEnterprise = pmsEnterpriseService.selectPmsEnterpriseByIdentifier(hostedPmsProductLibraryRepositoriesInputVo.getEnterpriseIdentifier()); PmsEnterprise pmsEnterprise = pmsEnterpriseService.selectPmsEnterpriseByIdentifier(hostedPmsProductLibraryRepositoriesInputVo.getEnterpriseIdentifier());
// 校验制品库名称 // 校验制品库标识
Integer count = pmsProductLibraryRepositoriesMapper.selectPmsProductLibraryRepositoriesByNameCount( Integer nameCount = pmsProductLibraryRepositoriesMapper.selectPmsProductLibraryRepositoriesByNameCount(
hostedPmsProductLibraryRepositoriesInputVo.getName(), hostedPmsProductLibraryRepositoriesInputVo.getEnterpriseIdentifier(), hostedPmsProductLibraryRepositoriesInputVo.getFormat()); hostedPmsProductLibraryRepositoriesInputVo.getName(), hostedPmsProductLibraryRepositoriesInputVo.getEnterpriseIdentifier(), hostedPmsProductLibraryRepositoriesInputVo.getFormat());
if (count > 0) { if (nameCount > 0) {
throw new ServiceException("该制品库名称在当前企业下已存在(制品库名称[%s])", hostedPmsProductLibraryRepositoriesInputVo.getName()); 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); checkInputParameter(hostedPmsProductLibraryRepositoriesInputVo);
NexusHostedRepoInputVo requestBody = hostedPmsProductLibraryRepositoriesInputVo.toNexusRepoDataVo(); NexusHostedRepoInputVo requestBody = hostedPmsProductLibraryRepositoriesInputVo.toNexusRepoDataVo();

View File

@ -63,7 +63,7 @@ public class PmsProductLibrarySnapshotRepoServiceImpl implements IPmsProductLibr
PmsProductLibraryRepositories pmsProductLibraryRepositories = PmsProductLibraryRepositories pmsProductLibraryRepositories =
pmsProductLibraryRepositoriesMapper.selectPmsProductLibrarySnapshotByName(enterpriseIdentifier, repoName, snapshotName); pmsProductLibraryRepositoriesMapper.selectPmsProductLibrarySnapshotByName(enterpriseIdentifier, repoName, snapshotName);
if (pmsProductLibraryRepositories == null) { if (pmsProductLibraryRepositories == null) {
throw new ServiceException("组织下不存在该快照库(组织标识[%s],制品库名称[%s],快照库名称[%s])", enterpriseIdentifier, repoName, snapshotName); throw new ServiceException("组织下不存在该快照库(组织标识[%s],制品库标识[%s],快照库标识[%s])", enterpriseIdentifier, repoName, snapshotName);
} }
return pmsProductLibraryRepositories; return pmsProductLibraryRepositories;
} }
@ -78,7 +78,7 @@ public class PmsProductLibrarySnapshotRepoServiceImpl implements IPmsProductLibr
@Override @Override
public Long insertPmsProductLibrarySnapshot(ProductRepositoriesSnapshotInputVo snapshotInputVo) { public Long insertPmsProductLibrarySnapshot(ProductRepositoriesSnapshotInputVo snapshotInputVo) {
// 未填快照库名称将根据时分秒生成名称 // 未填快照库标识将根据时分秒生成名称
if (StringUtils.isEmpty(snapshotInputVo.getName())) { if (StringUtils.isEmpty(snapshotInputVo.getName())) {
snapshotInputVo.setName(DateUtils.dateTimeNow()); snapshotInputVo.setName(DateUtils.dateTimeNow());
} }
@ -88,13 +88,13 @@ public class PmsProductLibrarySnapshotRepoServiceImpl implements IPmsProductLibr
if (ProductLibraryRepositoriesFormatEnum.DOCKER.getKey().equals(repo.getFormat())) { if (ProductLibraryRepositoriesFormatEnum.DOCKER.getKey().equals(repo.getFormat())) {
throw new ServiceException("Docker格式制品库不支持创建快照"); throw new ServiceException("Docker格式制品库不支持创建快照");
} }
// 校验制品库名称 // 校验制品库标识
Integer count = pmsProductLibraryRepositoriesMapper.selectRepositoriesSnapshotBySnapshotNameCount( Integer count = pmsProductLibraryRepositoriesMapper.selectRepositoriesSnapshotBySnapshotNameCount(
snapshotInputVo.getEnterpriseIdentifier(), snapshotInputVo.getEnterpriseIdentifier(),
repo.getName(), repo.getName(),
snapshotInputVo.getName()); snapshotInputVo.getName());
if (count > 0) { 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); NexusHostedRepoInputVo requestBody = snapshotInputVo.toNexusRepoDataVo(repo);

View File

@ -135,6 +135,22 @@
and pe.enterprise_identifier = #{pmsEnterpriseIdentifier} and pe.enterprise_identifier = #{pmsEnterpriseIdentifier}
and pplr.snapshot_name IS NOT NULL and pplr.snapshot_name IS NOT NULL
</select> </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" <insert id="insertPmsProductLibraryRepositories" parameterType="PmsProductLibraryRepositories"
useGeneratedKeys="true" keyProperty="id"> useGeneratedKeys="true" keyProperty="id">