BUG
jiangqs
2023-04-24 aa2eae024f8f251c8e2b9eace5351dea7e315ed7
hrt-modules/hrt-system/src/main/java/com/hrt/system/service/impl/ShopGoodsServiceImpl.java
@@ -1,5 +1,8 @@
package com.hrt.system.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hrt.system.domain.poji.activity.ActivityGoods;
import com.hrt.system.domain.poji.shop.ShopGoods;
import com.hrt.system.mapper.shop.ShopGoodsMapper;
import com.hrt.system.service.shop.ShopGoodsService;
@@ -17,4 +20,17 @@
@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;
    }
}