TASK:搭配

This commit is contained in:
shahaibo
2024-04-07 16:46:48 +08:00
parent a3aee69512
commit d05d4d4e64

View File

@@ -1153,7 +1153,8 @@ public class TProductService extends ServiceImpl<TProductMapper, TProduct> {
List<GenerateCollocationQueryNewDTO> database = new ArrayList<>(); List<GenerateCollocationQueryNewDTO> database = new ArrayList<>();
for (TProduct tProduct : validateList) { for (TProduct tProduct : validateList) {
GenerateCollocationQueryNewDTO vo = new GenerateCollocationQueryNewDTO(); GenerateCollocationQueryNewDTO vo = new GenerateCollocationQueryNewDTO();
vo.setItem_name(tProduct.getPictureName().split("_")[0]); // vo.setItem_name(tProduct.getPictureName().split("_")[0]);
vo.setItem_name(tProduct.getPictureName());
vo.setImage_path(tProduct.getPictureUrl()); vo.setImage_path(tProduct.getPictureUrl());
String[] split = tProduct.getPictureUrl().split("/"); String[] split = tProduct.getPictureUrl().split("/");
vo.setSemantic_category(split[2] + "/" + split[3]); vo.setSemantic_category(split[2] + "/" + split[3]);
@@ -1161,7 +1162,8 @@ public class TProductService extends ServiceImpl<TProductMapper, TProduct> {
} }
for (TProduct tProduct : db) { for (TProduct tProduct : db) {
GenerateCollocationQueryNewDTO vo = new GenerateCollocationQueryNewDTO(); GenerateCollocationQueryNewDTO vo = new GenerateCollocationQueryNewDTO();
vo.setItem_name(tProduct.getPictureName().split("_")[0]); // vo.setItem_name(tProduct.getPictureName().split("_")[0]);
vo.setItem_name(tProduct.getPictureName());
vo.setImage_path(tProduct.getPictureUrl()); vo.setImage_path(tProduct.getPictureUrl());
String[] split = tProduct.getPictureUrl().split("/"); String[] split = tProduct.getPictureUrl().split("/");
vo.setSemantic_category(split[2] + "/" + split[3]); vo.setSemantic_category(split[2] + "/" + split[3]);