fix(制品库优化): 优化制品移入产品库逻辑
制品文件下载成功后,同时将制品文件标识更新到制品assetId相同的制品中 Signed-off-by: OTTO <731554297@qq.com>
This commit is contained in:
parent
2d4392bfb2
commit
3dea48610d
|
|
@ -67,7 +67,7 @@ public interface PmsProductLibraryComponentMapper {
|
|||
* 在组织下根据制品库标识和制品文件名称查找制品文件
|
||||
*
|
||||
* @param name 制品文件名称
|
||||
* @param repoId 制品库id
|
||||
* @param repoId 制品库id
|
||||
* @param pmsEnterpriseId 组织Id
|
||||
* @return 制品文件
|
||||
*/
|
||||
|
|
@ -85,7 +85,7 @@ public interface PmsProductLibraryComponentMapper {
|
|||
* 查询对应路径下制品文件列表
|
||||
*
|
||||
* @param path 路径
|
||||
* @param repoId 制品库id
|
||||
* @param repoId 制品库id
|
||||
* @param pmsEnterpriseId 组织Id
|
||||
* @return 制品文件列表
|
||||
*/
|
||||
|
|
@ -115,4 +115,6 @@ public interface PmsProductLibraryComponentMapper {
|
|||
* @return 来自流水线的制品
|
||||
*/
|
||||
List<PmsProductLibraryComponent> selectComponentListFromPipelineByAssetIdList(@Param("assetIdList") List<String> assetIdList);
|
||||
|
||||
void batchUpdateAssetFileIdentifier(@Param("assetId") String assetId, @Param("fileIdentifier") String fileIdentifier);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,4 +131,6 @@ public interface IPmsProductLibraryComponentService {
|
|||
void unlockComponentList(Long productRepoId, List<String> componentIdList);
|
||||
|
||||
boolean getLockComponentStatus(Long productRepoId, String assetId);
|
||||
|
||||
void batchUpdateAssetFileIdentifier(String assetId, String fileIdentifier);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,6 +115,8 @@ public class PmsProductLibraryAsyncServiceImpl implements IPmsProductLibraryAsyn
|
|||
remoteFileService.downloadFileByUrl(nexusFileUrl, "pms",
|
||||
productRepo.getPmsEnterpriseIdentifier() + "/productLibrary", SecurityConstants.INNER)
|
||||
);
|
||||
// 制品文件下载成功后,同时将制品文件标识更新到制品assetId相同的制品中
|
||||
pmsProductLibraryComponentService.batchUpdateAssetFileIdentifier(nexusAssetResultDataVo.getId(), fileIdentifier);
|
||||
assetRawInputVo.setFileIdentifier(fileIdentifier);
|
||||
}
|
||||
assetRawInputVoList.add(assetRawInputVo);
|
||||
|
|
|
|||
|
|
@ -707,6 +707,11 @@ public class PmsProductLibraryComponentServiceImpl implements IPmsProductLibrary
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchUpdateAssetFileIdentifier(String assetId, String fileIdentifier) {
|
||||
pmsProductLibraryComponentMapper.batchUpdateAssetFileIdentifier(assetId, fileIdentifier);
|
||||
}
|
||||
|
||||
private SysFileBytes getFeignFile(String fileIdentifier) {
|
||||
try {
|
||||
Response response = fileService.getFileEntityByIdentifier(fileIdentifier, SecurityConstants.INNER);
|
||||
|
|
|
|||
|
|
@ -220,6 +220,11 @@
|
|||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="batchUpdateAssetFileIdentifier">
|
||||
update pms_product_library_component
|
||||
set file_identifier = #{fileIdentifier}
|
||||
where identifier = #{assetId}
|
||||
</update>
|
||||
|
||||
<delete id="deletePmsProductLibraryComponentById" parameterType="Long">
|
||||
delete
|
||||
|
|
|
|||
Loading…
Reference in New Issue