Description or Example
# 核心代码
```java
@Override
public List<ProductAttrValueEntity> getBaseAttrBySpuId(Long spuId) {
return this.list(new LambdaQueryWrapper<ProductAttrValueEntity>()
.eq(ProductAttrValueEntity::getSpuId, spuId));
}
```
```java
@RequestMapping("/base/listforspu/{spuId}")
public R getBaseAttrBySpu(@PathVariable("spuId") Long spuId) {
List<ProductAttrValueEntity> productAttrValueEntities = productAttrValueService.getBaseAttrBySpuId(spuId);
return R.ok().put("data", productAttrValueEntities);
}
```