| | |
| | | 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.GoodsBrand; |
| | | import com.ruoyi.goods.domain.vo.GoodsBrandVO; |
| | | import com.ruoyi.goods.mapper.GoodsBrandMapper; |
| | | import com.ruoyi.goods.service.IGoodsBrandService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import java.util.List; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | @Service |
| | | public class GoodsBrandServiceImpl extends ServiceImpl<GoodsBrandMapper, GoodsBrand> implements IGoodsBrandService { |
| | | |
| | | /** |
| | | * 获取商品品牌列表。 |
| | | * <p>此方法通过调用{@code list()}方法获取原始列表,并使用BeanUtils的{@code copyList}方法将其复制为{@code |
| | | * GoodsBrandVO}类型的列表后返回。</p> |
| | | * |
| | | * @return 返回一个{@code GoodsBrandVO}类型的列表,包含商品品牌信息。 |
| | | */ |
| | | @Override |
| | | public List<GoodsBrandVO> getGoodsBrandList() { |
| | | // 将原始列表转换为GoodsBrandVO类型的列表 |
| | | return BeanUtils.copyList(this.list(), GoodsBrandVO.class); |
| | | } |
| | | |
| | | } |