BUGFIX:获取brand dna计算时间为空

This commit is contained in:
2025-08-26 16:24:52 +08:00
parent 83ba69c950
commit 6e9213ec5a
2 changed files with 5 additions and 2 deletions

View File

@@ -62,8 +62,11 @@ public class ProductImageServiceImpl implements ProductImageService {
if (Objects.isNull(progressDTO)) {
progressDTO = new ProgressDTO(0, 0, false, null);
redisUtil.setTaskProgressDTO(progressKey, progressDTO);
} else {
progressDTO.setTotal(0);
progressDTO.setCurrent(0);
}
redisUtil.setTaskProgressDTO(progressKey, progressDTO);
try {
List<BrandRelLibrary> brandRelLibraries = brandRelLibraryMapper.selectList(

View File

@@ -1605,12 +1605,12 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
return vo;
}
vo.setAnalyzed(true);
vo.setComputeTime(dto.getComputeTime());
if (dto.getTotal() == 0 || dto.isError()) {
vo.setPercent(0.0);
return vo;
}
vo.setPercent(dto.getCurrent() * 1.0 / dto.getTotal());
vo.setComputeTime(dto.getComputeTime());
return vo;
}