This commit is contained in:
@@ -30,6 +30,13 @@ public class CategoryAttributeServiceImpl implements CategoryAttributeService {
|
||||
@Override
|
||||
@Transactional
|
||||
public void saveAttributes(String categoryId, List<CategoryAttribute> attrs) {
|
||||
System.out.println("=== saveAttributes called ===");
|
||||
System.out.println("categoryId: " + categoryId);
|
||||
System.out.println("attrs size: " + (attrs != null ? attrs.size() : 0));
|
||||
if (attrs != null) {
|
||||
attrs.forEach(a -> System.out.println(" attr: " + a.getName() + ", type=" + a.getAttrType() + ", unit=" + a.getUnit()));
|
||||
}
|
||||
|
||||
// 删除旧属性
|
||||
categoryAttributeMapper.delete(new LambdaQueryWrapper<CategoryAttribute>()
|
||||
.eq(CategoryAttribute::getCategoryId, categoryId));
|
||||
@@ -44,6 +51,7 @@ public class CategoryAttributeServiceImpl implements CategoryAttributeService {
|
||||
categoryAttributeMapper.insert(attr);
|
||||
}
|
||||
}
|
||||
System.out.println("=== saveAttributes done ===");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user