| | |
| | | package com.ruoyi.order.service.impl.goods; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import com.ruoyi.order.domain.pojo.goods.GoodsFile; |
| | | import com.ruoyi.order.domain.pojo.order.ShoppingCart; |
| | | import com.ruoyi.order.mapper.goods.GoodsFileMapper; |
| | | import com.ruoyi.order.service.goods.GoodsFileService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class GoodsFileServiceImpl extends ServiceImpl<GoodsFileMapper, GoodsFile> implements GoodsFileService { |
| | | |
| | | @Resource |
| | | private GoodsFileMapper goodsFileMapper; |
| | | |
| | | |
| | | /** |
| | | * @description: TODO |
| | | * @author jqs34 |
| | | * @date 2023/5/3 2:14 |
| | | * @version 1.0 |
| | | */ |
| | | @Override |
| | | public GoodsFile getGoodsPicture(String goodsId){ |
| | | LambdaQueryWrapper<GoodsFile> queryWrapper = Wrappers.lambdaQuery(); |
| | | queryWrapper.eq(GoodsFile::getDelFlag, 0).eq(GoodsFile::getGoodsId, goodsId).eq(GoodsFile::getFileType,1); |
| | | GoodsFile goodsFile = this.getOne(queryWrapper); |
| | | return goodsFile; |
| | | } |
| | | |
| | | /** |
| | | * @description: TODO |
| | | * @author jqs34 |
| | | * @date 2023/5/3 2:05 |
| | | * @version 1.0 |
| | | */ |
| | | @Override |
| | | public List<GoodsFile> listByGoodsId(String goodsId){ |
| | | LambdaQueryWrapper<GoodsFile> queryWrapper = Wrappers.lambdaQuery(); |
| | | queryWrapper.eq(GoodsFile::getDelFlag, 0).eq(GoodsFile::getGoodsId, goodsId); |
| | | List<GoodsFile> goodsFileList = this.list(queryWrapper); |
| | | return goodsFileList; |
| | | } |
| | | } |