Commit 5b881f95 authored by 赵啸非's avatar 赵啸非

修改产品分类与公司查询

parent a1553220
...@@ -225,7 +225,7 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao, ...@@ -225,7 +225,7 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao,
CompanyProductQuery companyProductQuery = new CompanyProductQuery(); CompanyProductQuery companyProductQuery = new CompanyProductQuery();
companyProductQuery.setProductId(entity.getId()); companyProductQuery.setProductId(entity.getId());
companyProductQuery.setCompanyIdList(companyList); // companyProductQuery.setCompanyIdList(companyList);
Long[] companyProductRemoveIds = companyProductService.find(companyProductQuery).stream().map(i -> i.getId()).toArray(Long[]::new); Long[] companyProductRemoveIds = companyProductService.find(companyProductQuery).stream().map(i -> i.getId()).toArray(Long[]::new);
if (!ObjectUtils.isEmpty(companyProductRemoveIds)) { if (!ObjectUtils.isEmpty(companyProductRemoveIds)) {
...@@ -252,7 +252,7 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao, ...@@ -252,7 +252,7 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao,
List<Long> categoryList = Arrays.asList(entity.getCategoryId().split(",")).stream().map(i->Long.parseLong(i)).collect(Collectors.toList()); List<Long> categoryList = Arrays.asList(entity.getCategoryId().split(",")).stream().map(i->Long.parseLong(i)).collect(Collectors.toList());
ProductCategoryQuery productCategoryQuery = new ProductCategoryQuery(); ProductCategoryQuery productCategoryQuery = new ProductCategoryQuery();
productCategoryQuery.setProductId(entity.getId()); productCategoryQuery.setProductId(entity.getId());
productCategoryQuery.setCategoryIdList(categoryList); //productCategoryQuery.setCategoryIdList(categoryList);
Long[] productCategoryRemoveIds = productCategoryService.find(productCategoryQuery).stream().map(i -> i.getId()).toArray(Long[]::new); Long[] productCategoryRemoveIds = productCategoryService.find(productCategoryQuery).stream().map(i -> i.getId()).toArray(Long[]::new);
if (!ObjectUtils.isEmpty(productCategoryRemoveIds)) { if (!ObjectUtils.isEmpty(productCategoryRemoveIds)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment