Commit 3318e751 authored by 王晓旭's avatar 王晓旭
parents 62af4abc 38e1d2c5
...@@ -80,7 +80,7 @@ public class ProductController extends BaseCRUDJsonBodyMappingController<Product ...@@ -80,7 +80,7 @@ public class ProductController extends BaseCRUDJsonBodyMappingController<Product
@Override @Override
protected int editAfter(Long id, Map<String, Object> model, ProductEntity entity, Context context) throws AppException { protected int editAfter(Long id, Map<String, Object> model, ProductEntity entity, Context context) throws AppException {
String categoryIds = productCategoryService.find(new ProductCategoryQuery().productId(entity.getId())).stream().map(i -> i.getCategoryId().toString()).collect(Collectors.joining(",")); String categoryIds = productCategoryService.find(new ProductCategoryQuery().productId(entity.getId())).stream().map(i -> i.getCategoryId().toString()).collect(Collectors.joining(","));
String companyIds = companyProductService.find(new CompanyProductQuery().productId(entity.getId())).stream().map(i -> i.getProductId().toString()).collect(Collectors.joining(",")); String companyIds = companyProductService.find(new CompanyProductQuery().productId(entity.getId())).stream().map(i -> i.getCompanyId().toString()).collect(Collectors.joining(","));
if (!ObjectUtils.isEmpty(categoryIds)) { if (!ObjectUtils.isEmpty(categoryIds)) {
entity.setCategoryId(categoryIds); entity.setCategoryId(categoryIds);
......
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