fix: 修复ProductController中saveCategoryAttributes参数类型为CategoryAttribute
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -48,13 +48,6 @@ public class CategoryAttributeServiceImpl implements CategoryAttributeService {
|
||||
attr.setCategoryId(categoryId);
|
||||
attr.setSortOrder(i);
|
||||
|
||||
// 处理 required 字段类型(前端可能是 Boolean,后端存 Integer)
|
||||
if (attr.getRequired() != null) {
|
||||
if (attr.getRequired() instanceof Boolean) {
|
||||
attr.setRequired(((Boolean) attr.getRequired()) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println(" attr: " + attr.getName() + ", type=" + attr.getAttrType() + ", unit=" + attr.getUnit());
|
||||
categoryAttributeMapper.insert(attr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user