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.ShopGoods;
|
import com.ruoyi.order.mapper.goods.ShopGoodsMapper;
|
import com.ruoyi.order.service.goods.ShopGoodsService;
|
import org.springframework.stereotype.Service;
|
|
/**
|
* <p>
|
* 商户定制商品 服务实现类
|
* </p>
|
*
|
* @author jqs
|
* @since 2023-04-25
|
*/
|
@Service
|
public class ShopGoodsServiceImpl extends ServiceImpl<ShopGoodsMapper, ShopGoods> implements ShopGoodsService {
|
/**
|
* 通过商户id和商品id获取
|
* @param shopId
|
* @param goodsId
|
* @return
|
*/
|
@Override
|
public ShopGoods getByShopIdAndGoodsId(Long shopId,String goodsId){
|
LambdaQueryWrapper<ShopGoods> queryWrapper = Wrappers.lambdaQuery();
|
queryWrapper.eq(ShopGoods::getDelFlag, 0).eq(ShopGoods::getShopId, shopId).eq(ShopGoods::getGoodsId, goodsId);
|
ShopGoods shopGoods = this.getOne(queryWrapper);
|
return shopGoods;
|
}
|
}
|