|
|
@@ -24,7 +24,7 @@ public class NutritionProductService {
|
|
|
private NutritionBrandMapper brandMapper;
|
|
|
|
|
|
@Resource
|
|
|
- private NutritionProductMapper productMapper;
|
|
|
+ private NutritionProductMapper nutritionProductMapper;
|
|
|
|
|
|
@Resource
|
|
|
private NutritionIngredientMapper ingredientMapper;
|
|
|
@@ -52,7 +52,7 @@ public class NutritionProductService {
|
|
|
List<NutritionBrand> brands = brandMapper.selectList(null);
|
|
|
List<Map<String, Object>> result = new ArrayList<>();
|
|
|
for (NutritionBrand brand : brands) {
|
|
|
- Long count = productMapper.selectCount(
|
|
|
+ Long count = nutritionProductMapper.selectCount(
|
|
|
new LambdaQueryWrapper<NutritionProduct>()
|
|
|
.eq(NutritionProduct::getBrandId, brand.getId())
|
|
|
);
|
|
|
@@ -81,12 +81,12 @@ public class NutritionProductService {
|
|
|
}
|
|
|
wrapper.eq(NutritionProduct::getStatus, 1);
|
|
|
wrapper.orderByDesc(NutritionProduct::getUpdateTime);
|
|
|
- return productMapper.selectList(wrapper);
|
|
|
+ return nutritionProductMapper.selectList(wrapper);
|
|
|
}
|
|
|
|
|
|
/** 产品详情(含成分、各平台价格、评价) */
|
|
|
public Map<String, Object> detail(Long productId) {
|
|
|
- NutritionProduct product = productMapper.selectById(productId);
|
|
|
+ NutritionProduct product = nutritionProductMapper.selectById(productId);
|
|
|
if (product == null) {
|
|
|
return null;
|
|
|
}
|