| | |
| | | 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.GoodsSeries; |
| | | import com.ruoyi.goods.domain.vo.GoodsSeriesVO; |
| | | import com.ruoyi.goods.mapper.GoodsSeriesMapper; |
| | | import com.ruoyi.goods.service.IGoodsSeriesService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import java.util.List; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | @Service |
| | | public class GoodsSeriesServiceImpl extends ServiceImpl<GoodsSeriesMapper, GoodsSeries> implements IGoodsSeriesService { |
| | | |
| | | /** |
| | | * 获取商品系列列表的视图对象。 |
| | | * |
| | | * <p>此方法不接受任何参数,它会调用 {@code list()} 方法获取原始列表, |
| | | * 然后使用 {@code BeanUtils.copyList} 将这些实体转换为视图对象。</p> |
| | | * |
| | | * @return 返回一个 {@link List} 类型的商品系列视图对象列表。每个视图对象代表一个商品系列的简要信息。 |
| | | */ |
| | | @Override |
| | | public List<GoodsSeriesVO> getGoodsSeriesList() { |
| | | // 使用BeanUtils工具类将实体列表转换为视图对象列表 |
| | | return BeanUtils.copyList(this.list(), GoodsSeriesVO.class); |
| | | } |
| | | |
| | | } |