| | |
| | | package com.ruoyi.goods.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.utils.page.BeanUtils; |
| | | import com.ruoyi.goods.domain.pojo.GoodsFlavorType; |
| | | import com.ruoyi.goods.domain.vo.GoodsFlavorTypeVO; |
| | | import com.ruoyi.goods.mapper.GoodsFlavorTypeMapper; |
| | | import com.ruoyi.goods.service.IGoodsFlavorTypeService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import java.util.List; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | @Service |
| | | public class GoodsFlavorTypeServiceImpl extends ServiceImpl<GoodsFlavorTypeMapper, GoodsFlavorType> implements IGoodsFlavorTypeService { |
| | | |
| | | /** |
| | | * 获取商品口味类型的列表。 |
| | | * <p>此方法通过调用 {@code list()} 方法获取原始列表,并使用 {@code BeanUtils.copyList} 方法将每个元素转换为 |
| | | * {@code GoodsFlavorTypeVO} 类型,最终返回转换后的列表。</p> |
| | | * |
| | | * @return 返回一个 {@code List<GoodsFlavorTypeVO>},包含转换后的商品口味类型信息。 |
| | | */ |
| | | @Override |
| | | public List<GoodsFlavorTypeVO> getGoodsFlavorTypeList() { |
| | | return BeanUtils.copyList(this.list(), GoodsFlavorTypeVO.class); |
| | | } |
| | | } |